|
|
Transfer function with exponential
Is there a way to input a transfer function into matlab that has an exponential in the numerator such as:
H(s) = (1+exp(-2s))/(s+1)
When I try to input it I get back:
??? Error using ==> lti.plus at 64
System interconnection gives rise to internal delays and can only be represented in state space. Convert
at least one of the models to state space using the "ss" command.
Thanks.
|
|
0
|
|
|
|
Reply
|
John
|
12/11/2010 6:17:05 PM |
|
"John Parker" <notsure@gmail.com> wrote in message <ie0f71$t8g$1@fred.mathworks.com>...
> Is there a way to input a transfer function into matlab that has an exponential in the numerator such as:
>
> H(s) = (1+exp(-2s))/(s+1)
>
> When I try to input it I get back:
>
> ??? Error using ==> lti.plus at 64
> System interconnection gives rise to internal delays and can only be represented in state space. Convert
> at least one of the models to state space using the "ss" command.
>
> Thanks.
Try this:
s = tf('s');
sys1 = 1/(s + 1);
sys2 = exp(-2*s)/(s + 1);
H = ss(sys1) + ss(sys2);
ALi
|
|
0
|
|
|
|
Reply
|
Ali
|
12/11/2010 6:54:04 PM
|
|
That seemed to work. Thanks for the help! This is a great resource!
"Ali " <alial-hageali@hotmail.com> wrote in message <ie0hcc$2tp$1@fred.mathworks.com>...
> "John Parker" <notsure@gmail.com> wrote in message <ie0f71$t8g$1@fred.mathworks.com>...
> > Is there a way to input a transfer function into matlab that has an exponential in the numerator such as:
> >
> > H(s) = (1+exp(-2s))/(s+1)
> >
> > When I try to input it I get back:
> >
> > ??? Error using ==> lti.plus at 64
> > System interconnection gives rise to internal delays and can only be represented in state space. Convert
> > at least one of the models to state space using the "ss" command.
> >
> > Thanks.
>
> Try this:
>
> s = tf('s');
> sys1 = 1/(s + 1);
> sys2 = exp(-2*s)/(s + 1);
> H = ss(sys1) + ss(sys2);
>
> ALi
|
|
0
|
|
|
|
Reply
|
John
|
12/11/2010 7:12:04 PM
|
|
I have another question that might be a little more mathematical. When combining systems like that, if the is an instance such as:
H(s) = (2*s+exp(-3*s))/(2*s)
Would you break the system into: sys1=2*s/(2*s) and sys2=exp(-3*s)/(2*s), or would you do sys1=1 and sys2=exp(-3*s)/(2*s). They seem to have different outcomes.
"John Parker" <notsure@gmail.com> wrote in message <ie0ie4$hpf$1@fred.mathworks.com>...
> That seemed to work. Thanks for the help! This is a great resource!
>
>
> "Ali " <alial-hageali@hotmail.com> wrote in message <ie0hcc$2tp$1@fred.mathworks.com>...
> > "John Parker" <notsure@gmail.com> wrote in message <ie0f71$t8g$1@fred.mathworks.com>...
> > > Is there a way to input a transfer function into matlab that has an exponential in
the numerator such as:
> > >
> > > H(s) = (1+exp(-2s))/(s+1)
> > >
> > > When I try to input it I get back:
> > >
> > > ??? Error using ==> lti.plus at 64
> > > System interconnection gives rise to internal delays and can only be represented in state space. Convert
> > > at least one of the models to state space using the "ss" command.
> > >
> > > Thanks.
> >
> > Try this:
> >
> > s = tf('s');
> > sys1 = 1/(s + 1);
> > sys2 = exp(-2*s)/(s + 1);
> > H = ss(sys1) + ss(sys2);
> >
> > ALi
|
|
0
|
|
|
|
Reply
|
John
|
12/11/2010 7:33:04 PM
|
|
you should break it into : sys1=2*s/(2*s) and sys2=exp(-3*s)/(2*s)
you can also use the InternalDelay property to model a delay in the system like that:
set(H, 'InternalDelay', delay);
"John Parker" <notsure@gmail.com> wrote in message <ie0jlg$6gg$1@fred.mathworks.com>...
> I have another question that might be a little more mathematical. When combining systems like that, if the is an instance such as:
>
> H(s) = (2*s+exp(-3*s))/(2*s)
>
> Would you break the system into: sys1=2*s/(2*s) and sys2=exp(-3*s)/(2*s), or would you do sys1=1 and sys2=exp(-3*s)/(2*s). They seem to have different outcomes.
>
>
> "John Parker" <notsure@gmail.com> wrote in message <ie0ie4$hpf$1@fred.mathworks.com>...
> > That seemed to work. Thanks for the help! This is a great resource!
> >
> >
> > "Ali " <alial-hageali@hotmail.com> wrote in message <ie0hcc$2tp$1@fred.mathworks.com>...
> > > "John Parker" <notsure@gmail.com> wrote in message <ie0f71$t8g$1@fred.mathworks.com>...
> > > > Is there a way to input a transfer function into matlab that has an exponential in
>
>
> the numerator such as:
> > > >
> > > > H(s) = (1+exp(-2s))/(s+1)
> > > >
> > > > When I try to input it I get back:
> > > >
> > > > ??? Error using ==> lti.plus at 64
> > > > System interconnection gives rise to internal delays and can only be represented in state space. Convert
> > > > at least one of the models to state space using the "ss" command.
> > > >
> > > > Thanks.
> > >
> > > Try this:
> > >
> > > s = tf('s');
> > > sys1 = 1/(s + 1);
> > > sys2 = exp(-2*s)/(s + 1);
> > > H = ss(sys1) + ss(sys2);
> > >
> > > ALi
|
|
0
|
|
|
|
Reply
|
Ali
|
12/11/2010 8:07:04 PM
|
|
|
4 Replies
1508 Views
(page loaded in 0.16 seconds)
|
|
|
|
|
|
|
|
|