2
\$\begingroup\$

i would appreciate some help in solving this problem, i need to find the transient response for a unit step, i have a brief idea of how to solve, but my graphs in matlab doesnt seem to fit with the graph form i have to reach, i would appreciate any help or advice.

i also attach an example of matlab commands for a example function of ZoH * s/s(s+1), same problem but with a=1, i cant manage to have a response like i attached too since my a is 2 and im trying to work it out with an "adjustment" as can be seen in my process.

Any kind of advice or help, would be very appreciatted, thanks in advance.

Also, i add these images, in case anyone can point whats wrong with my calculations.

Part 1 of my calculations for 1/s(s+2)

part 2 of my calculations

Part 3 of my calculations

the problem with a=2

same problem but with a now as 2

The response of a ZoH * 1/s(s+1)

the matlab commands for ZoH * s/s(s+1)

\$\endgroup\$
2
  • \$\begingroup\$ The input to the zoh is a continuous signal. \$\endgroup\$
    – Chu
    Apr 3 '20 at 0:48
  • \$\begingroup\$ No sorry, is a sample with T=1second \$\endgroup\$ Apr 3 '20 at 1:02
2
\$\begingroup\$

I haven't checked your solution in any detail, but my analysis gives the OLTF:

$$\small G_{OL}=\frac{z}{z-1}\: \large \mathcal {Z}\small \left( \frac{a}{s^2(s+a)}\right ) = \frac{z}{z-1}\: \large \mathcal {Z}\small \left( \frac{1}{s^2} -\frac{1/a}{s} +\frac{1/a}{s+a}\right ) $$

taking z-transforms:

$$\small G_{OL}(z)= \frac{z-1}{z}\left( \frac{Tz}{(z-1)^2}-\frac{1}{a}\frac{z}{(z-1)}+\frac{1}{a}\frac{z}{(z-e^{-aT})}\right )$$

$$\small \therefore \: G_{OL}(z)= \frac{T}{(z-1)}-\frac{1}{a}+\frac{1}{a}\frac{z-1}{(z-e^{-aT})}$$

and the CLTF, taking \$\small T=1\$: $$ \small G(z)=\frac{(a+e^{-a}-1)z+(1-e^{-a}-ae^{-a})}{az^2+(e^{-a}-1-ae^{-a})z+(1-e^{-a}) }$$

In regard to your parameter values, \$\small a=T=1\$ gives a critically stable closed loop (pole on the unit circle). However, taking \$\small a=2; T=1\$, gives the CLTF: $$ \small G(z)=\frac{0.57z+0.29}{z^2-0.57z+0.43}$$ which factorises to:

$$ \small G(z)=\frac{0.57z+0.29}{(z-0.285+ j0.59)(z-0.285- j0.59)}$$ and, with poles inside the unit circle, this CLTF is stable.

To plot the unit step response, we may obtain the difference equation from \$\small G(z)\$, thus:

$$\small y[k]=0.57x[k-1]+0.29x[k-2]+0.57y[k-1]-0.43y[k-2]$$

Excel produces the following step response from the difference equation:

enter image description here

\$\endgroup\$
1
\$\begingroup\$

i would appreciate some help in solving this problem, i need to find the transient response for a unit step

But your filter in Matlab is calculating an impulse.

\$\endgroup\$
9
  • \$\begingroup\$ thats the professor matlab calculation, so how do i manage to get it working in mine like that? i have the transfer function coefficients in matlab, but is a different response \$\endgroup\$ Apr 2 '20 at 23:58
  • \$\begingroup\$ the only difference is the input, you are doing an impulse [1 zeros(1,40)] to have a step you could just change it to [1 1+zeros(1,40)] that way you have an array of ones as inputs. \$\endgroup\$
    – jDAQ
    Apr 3 '20 at 0:01
  • \$\begingroup\$ Well i tried with an array of zeros, but doesnt works either, any chance you can check my process to see if i have any problems? i would appreciate it, im just doing it as my professor sent, but i dont find any sense at all \$\endgroup\$ Apr 3 '20 at 0:03
  • \$\begingroup\$ If you input to it an input that is always zero the filter will just output zero, I did not suggest doing that. \$\endgroup\$
    – jDAQ
    Apr 3 '20 at 0:07
  • \$\begingroup\$ Well i will try as you posted before, thanks for the advice \$\endgroup\$ Apr 3 '20 at 0:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.