Design a controller using Matlab

Click For Summary
SUMMARY

The discussion focuses on designing a controller in MATLAB for the plant represented by the transfer function G(s) = 1/(s(s+2)(0.4s+1)). The objectives are to achieve a velocity error constant K_v of 4, a phase margin of 60 degrees, and zero steady-state error for step input. The user initially attempted a lead/lag compensator structure D(s) = K(αs + 1)/(βs + 1) but faced challenges in adjusting the phase margin beyond 46 degrees. Ultimately, a restructured controller with two poles and two zeros was designed, resulting in satisfactory closed-loop characteristics.

PREREQUISITES
  • Understanding of control theory concepts, specifically steady-state error and phase margin.
  • Familiarity with MATLAB and its Control System Toolbox.
  • Knowledge of lead/lag compensator design techniques.
  • Proficiency in analyzing transfer functions and system stability.
NEXT STEPS
  • Explore MATLAB's sisotool for advanced compensator design and analysis.
  • Learn about the effects of pole-zero placement on system dynamics and stability.
  • Investigate methods for verifying steady-state error in closed-loop systems.
  • Study the relationship between controller gain and system performance metrics.
USEFUL FOR

Control engineers, MATLAB users, and students studying control systems who are involved in designing and analyzing controllers for dynamic systems.

PhysicoRaj
Gold Member
Messages
538
Reaction score
49

Homework Statement


For the plant:
##G(s)=\frac{1}{s(s+2)(0.4s+1)}##
Design a controller in Matlab such that ##K_v=4## , phase margin = ##60^o## and zero steady state error for step input.

Homework Equations


##e_{ss} = Lim_{s->0} \frac{s R(s)}{1+D(s)G(s)}##
Lead/Lag compensator structure: ##D(s) = K\frac{(\alpha s + 1)}{(\beta s + 1)}##

The Attempt at a Solution


From the data that ##e_{ss}=0## for step input and finite non zero velocity error for ramp reference, the system desired is type-1. The plant already has a pole at ##s=0##, hence the controller need not add poles at ##s=0## .
I chose the lead/lag compensator to tune the phase margin.
Using MATLAB I found the plant has a phase margin of ##65.7499^o## at phase crossover of ##0.4777 rad s^{-1}##.
To find the controller gain K:
using ##R(s) = \frac{1}{s^2}## (for ramp input) and ##e_{ss} = \frac{1}{4}## in the steady state error equation, I got ##K = 8## .
So my compensator becomes:
##D(s) = 8\frac{(\alpha s + 1)}{(\beta s + 1)}##

I loaded the plant in the Matlab sisotool and tried adjusting the phase margin to 60 degrees but its not going beyond 46 degrees:
attachment1.JPG


While with controller gain K around 2, the pm can be adjusted to 60 degrees:
attachment2.JPG


Is my choice of controller or controller gain wrong? Or have i missed anything in this route? Are other assumptions and calculations right? How do I proceed further?
Also, how would I verify the steady state error of the closed loop system after design (from the ramp response? [attachment3]) .

Thank you.
 

Attachments

  • attachment3.JPG
    attachment3.JPG
    35.3 KB · Views: 444
I finally solved it. I assumed the controller gain ##K = 8## to be the inherent gain of the plant and for that plant designed a restructured controller of the form:
##D(s) = \frac{(\alpha_1 s+1)(\alpha_2 s+1)}{(\beta_1 s+1)(\beta_2 s+1)}##
leaving with two poles and two zeros.

fig6_siso.JPG


Closed loop characteristics were satisfactory.

fig4_step.JPG


Thanks.
 

Attachments

  • fig5_ramp.JPG
    fig5_ramp.JPG
    28.4 KB · Views: 427

Similar threads

Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 4 ·
Replies
4
Views
3K
Replies
4
Views
6K
  • · Replies 8 ·
Replies
8
Views
2K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
Replies
3
Views
2K
Replies
1
Views
3K