Professional Documents
Culture Documents
KEN C. LECHADORES
Name
BS-ECE / CEAT-29-602P
Course/Section
ACTIVITY NO.12
SOLVING STEADY-STATE ERRORS USING MATLAB
PART 1:
Evaluate the static error constants and find the expected error for the standard step,
ramp, and parabolic inputs of the system given below
Kv=dcgain(lechadores2) ess=1/Kv
Ka=dcgain(lechadores3) ess=1/Ka
MATLAB RESULT:
Do the activity below. Take the screen shots of the results using MATLAB.
G(s) =
Using the following method: (a) manual solution; (b) using Matlab solve the following:
a. System type, .
b. Steady-state errors for standard step, ramp and parabolic inputs.
ANSWER:
a. Manual Solution:
b. Using MATLAB:
MATLAB CODE:
numg=100*poly([-8])
deng=poly([-7 -9])
lechadore1=tf(numg,deng)
'Check Stability'
lechadores=feedback(lechadores1,1)
poles=pole(lechadores)
'Step Input'
Kp=dcgain(lechadores1)
ess=1/(1+Kp)
'Ramp Input'
numsg=conv([1 0],numg)
densg=poly([-7 -9])
lechadores2=tf(numsg,densg)
lechadores2=minreal(lechadores2)
Kv=dcgain(lechadores2) ess=1/Kv
'Parabolic Input'
nums2g=conv([1 0 0],numg)
dens2g=poly([-7 -9])
lechadores3=tf(nums2g,dens2g)
lechadores3=minreal(lechadores3)
Ka=dcgain(lechadores3) ess=1/Ka
MATLAB RESULT:
PART 2:
Given the control system shown below, find the value of K so that there is 10% error in
the steady-state.
a. Using Manual Solution:
b. Using MATLAB:
dengdK=poly([0 -6 -7 -8])
GdK=tf(numgdK,dengdK)
numgkv=conv([1 0],numgdK)
dengkv=dengdK
lechadores=tf(numgkv,dengkv)
lechadores=minreal(lechadores)
KvdK=dcgain(lechadores)
ess=0.1 K=1/(ess*KvdK)
'Check Stability'
T=feedback(K*GdK,1)
poles=pole(T)
MATLAB RESULT:
Do the activity below. Take the screen shots of the results using MATLAB
Solve for the value of K to yield a 10% error in the steady state using the following:
a. Manual solution
b. Using MATLAB
MATLAB CODE:
numgdK=[1 12]
dengdK=poly([0 -14 -18])
GdK=tf(numgdK,dengdK)
numgkv=conv([1 0],numgdK)
dengkv=dengdK
lechadores=tf(numgkv,dengkv)
lechadores=minreal(lechadores)
KvdK=dcgain(lechadores)
ess=0.1 K=1/(ess*KvdK)
'Check Stability'
T=feedback(K*GdK,1)
poles=pole(T)
MATLAB RESULT:
Conclusion
In this task, inverse Laplace utilizing a MATLAB application is more challenging than
Laplace, particularly in partial fractions. The advantage here is that I had to learn a new set
of codes in order to get the correct answer. Debugging the code took a few hours because
I had to consider variables and tags in this task. Answering Laplace transform of
derivatives in a MATLAB program is a little more difficult than prior assignments, especially
when it comes to declaring variables and arranging the codes. The advantage is that you
learned a new set of codes to obtain the correct result. Also, because there are numerous
result, I used Laplace command and the dsolve command are used to solve the same set
Observation
engineers and scientists to evaluate and design systems and products that transform our
reality. For engineers and scientists, MATLAB is the most user-friendly and productive
computer environment. It includes the MATLAB programming language, which is the only