Full State Feedback question

In summary, the conversation discusses the implementation of a controller using state feedback technique on Simulink. It is mentioned that in order to simulate this technique, one needs to know the initial state of the system, which can be obtained using transducers or an observer. The conversation also mentions a way to implement the state feedback technique on Simulink by using an integrator and setting the initial state in the IC-field. However, the user is experiencing a steady state error in the system response, which may be due to a DC gain issue. To resolve this, the user may need to adjust the DC gain going into the system.
  • #1
zoom1
65
0
Below wikipedia page summarizes the full state feedback. Everything is clear but to be able to implement this controller I need to know my states. But What I know is just the A, B and C matrices. So, to be able to simulate this technique on simulink I need to observe the state, I think. Is this the only way, or there is a way around ?
 
Engineering news on Phys.org
  • #2
zoom1 said:
Below wikipedia page summarizes the full state feedback. Everything is clear but to be able to implement this controller I need to know my states. But What I know is just the A, B and C matrices. So, to be able to simulate this technique on simulink I need to observe the state, I think. Is this the only way, or there is a way around ?
If we're just talking simulation, you only need to know the initial state of the system. In practice, you'd need transducers for the full state or an observer (if your system is observable).

In Simulink, put down an integrator and take its output to be ##x##. Then use that output along with ##u## to form ##\dot{x}##, which is the input for the integrator you just put down. Enter the initial state into the IC-field of the integrator, choose solver etc. and simulate.
 
  • #3
milesyoung said:
If we're just talking simulation, you only need to know the initial state of the system. In practice, you'd need transducers for the full state or an observer (if your system is observable).

In Simulink, put down an integrator and take its output to be ##x##. Then use that output along with ##u## to form ##\dot{x}##, which is the input for the integrator you just put down. Enter the initial state into the IC-field of the integrator, choose solver etc. and simulate.

Output of the state-space block of simulink is only one of the state variables.

C*x = [0 1]*[y';y]

So I can't reach the state x.
Also simulink doesn't allow me to choose the C and Identity to get the x itself directly as output.
 
  • #4
zoom1 said:
Output of the state-space block of simulink is only one of the state variables.

C*x = [0 1]*[y';y]

So I can't reach the state x.
Also simulink doesn't allow me to choose the C and Identity to get the x itself directly as output.
Are you talking about this block?

If so, when you place it in your diagram, just set C = 1, D = 0, so the output is equal to the state ##x##.

Edit: If you have an older version of Simulink with a different implementation of the block, upload a screenshot of the configuration window for the block (the one that pops up when you double-click it), so I can see what you're on about.
 
Last edited:
  • #5
milesyoung said:
Are you talking about this block?

If so, when you place it in your diagram, just set C = 1, D = 0, so the output is equal to the state ##x##.

Edit: If you have an older version of Simulink with a different implementation of the block, upload a screenshot of the configuration window for the block (the one that pops up when you double-click it), so I can see what you're on about.

I am using the exacty block you showed but don't know why it does not work. I found a way around it by implementing the state space diagram with my own blocks.

However, I am not getting the response I am looking for.
My plant is = 1/s(s+1)

desired poles location's characteristic equation is s^2 + 3.28s + 12.96

So, I found the K1 and K2 values for the state feedback as 12.96 and 2.28 respectively.

When I apply the step input, at steady state system response's amplitude is 0.077 , but it should be 1, right ?

But design criteria I used to model the characteristic equation are met (20% overshoot and less than 0.5 sec. rise time)

Why there is such a steady state error ?
 
  • #6
Could you upload your Simulink model? If the matrices aren't defined in the Simulink diagram, then please include a MATLAB script to initialize them as well.
 
  • #7
milesyoung said:
Could you upload your Simulink model? If the matrices aren't defined in the Simulink diagram, then please include a MATLAB script to initialize them as well.

There it is;
http://dfiles.eu/files/24m30ce99
 
  • #8
zoom1 said:
I am using the exacty block you showed but don't know why it does not work. I found a way around it by implementing the state space diagram with my own blocks.

However, I am not getting the response I am looking for.
My plant is = 1/s(s+1)

desired poles location's characteristic equation is s^2 + 3.28s + 12.96

So, I found the K1 and K2 values for the state feedback as 12.96 and 2.28 respectively.

When I apply the step input, at steady state system response's amplitude is 0.077 , but it should be 1, right ?

But design criteria I used to model the characteristic equation are met (20% overshoot and less than 0.5 sec. rise time)

Why there is such a steady state error ?

if your closed loop transfer function is 1/(s^2 + 3.28s + 12.96), then your steady state gain will be 1/12.96, which is ~0.077. So your response is expected. You need to adjust the DC gain going in!

EDIT:
Also IMO you should almost always implement the state space diagram with your own blocks, as it can give you more insight into state values in simulation should you need them. Note there are exceptions
 
  • #9
donpacino said:
if your closed loop transfer function is 1/(s^2 + 3.28s + 12.96), then your steady state gain will be 1/12.96, which is ~0.077. So your response is expected. You need to adjust the DC gain going in!

EDIT:
Also IMO you should almost always implement the state space diagram with your own blocks, as it can give you more insight into state values in simulation should you need them. Note there are exceptions

But if I am controlling the system, it should track the reference with the desired criteria. So, what else can I change in the system to get it track the reference ?
 
  • #10
zoom1 said:
But if I am controlling the system, it should track the reference with the desired criteria. So, what else can I change in the system to get it track the reference ?
Full-state feedback allows you to set conditions for the eigenvalues of the closed-loop system matrix ##\mathbf{A} - \mathbf{BK}##, but you have no guarantee of any constraint on the steady-state errors between input and output channels. You'll need a slightly different control structure to handle that.

Try prescaling your input by 12.96 and see if that doesn't give you approximately zero steady-state error to a step input. I can post the design procedure a bit later.

Edit: The prescaler is trivial here since your system is so simple (SISO) - you just have to bring the DC gain up like donpacino mentioned.
 
  • #11
milesyoung said:
Full-state feedback allows you to set conditions for the eigenvalues of the closed-loop system matrix ##\mathbf{A} - \mathbf{BK}##, but you have no guarantee of any constraint on the steady-state errors between input and output channels. You'll need a slightly different control structure to handle that.

Try prescaling your input by 12.96 and see if that doesn't give you approximately zero steady-state error to a step input. I can post the design procedure a bit later.

Oh I see, then this is the trade-off between steady state error and being able to put the poles anywhere you wish as long as the plant is controllable
 
  • #12
zoom1 said:
Oh I see, then this is the trade-off between steady state error and being able to put the poles anywhere you wish as long as the plant is controllable
No, the Wikipedia page is just very light on details. It doesn't show you the control structure or design procedure to introduce a reference input without major shortfalls.
 
  • #14
milesyoung said:
See the first couple of slides 'Reference inputs: Case 1' here:
http://courses.ece.ubc.ca/eece491m/lectures/Lecture12.pdf

for a common method.

Ok, I got it.

I designed an observer over my model which is simply;

x'_head = Ax_head + Bu + L(y-Cx_head)

and used the x_head from the observer's output to multiply with K gain and feed back to the system with negative sign.

It worked perfectly, but now I want to inspect the poles and zeros of the overall system, so I need to find a TF between my refence and output. That was easy with classical methods but with state space matrices I have no idea how to get the TF. Couldn't find any piece of information on the web as well.

Any idea how to do that ?
 
  • #15
zoom1 said:
Ok, I got it.

I designed an observer over my model which is simply;

x'_head = Ax_head + Bu + L(y-Cx_head)

and used the x_head from the observer's output to multiply with K gain and feed back to the system with negative sign.

It worked perfectly, but now I want to inspect the poles and zeros of the overall system, so I need to find a TF between my refence and output. That was easy with classical methods but with state space matrices I have no idea how to get the TF. Couldn't find any piece of information on the web as well.

Any idea how to do that ?
Is the addition of the observer something you actually want?

If your goal was to ensure zero steady-state error to a step input, you could just have used the method shown in 'Case 1' in those slides - that was for full-state feedback, i.e. the control structure you already had in place.
 
  • #16
milesyoung said:
Is the addition of the observer something you actually want?

If your goal was to ensure zero steady-state error to a step input, you could just have used the method shown in 'Case 1' in those slides - that was for full-state feedback, i.e. the control structure you already had in place.

Yes I built the observer intentionally. It's clear that the pre-scaling works as I wished. But I just want to inspect the dynamics of the observer as well. So, that's why I am looking for close loop transformation.
 
  • #17
zoom1 said:
Ok, I got it.

I designed an observer over my model which is simply;

x'_head = Ax_head + Bu + L(y-Cx_head)

and used the x_head from the observer's output to multiply with K gain and feed back to the system with negative sign.

It worked perfectly, but now I want to inspect the poles and zeros of the overall system, so I need to find a TF between my refence and output. That was easy with classical methods but with state space matrices I have no idea how to get the TF. Couldn't find any piece of information on the web as well.

Any idea how to do that ?

You can dump data to the MATLAB workspace and do a bode plot to find the poles & zeros. That's how I've always done it. There may be a better way...
 
  • #18
The sad news is there is no super easy way to do it (in comparison to a TF system in MATLAB where you simply type in poles(sys) ).
If you find a very easy tool to do it with let me know.
 
  • #19
donpacino said:
You can dump data to the MATLAB workspace and do a bode plot to find the poles & zeros. That's how I've always done it. There may be a better way...

How do you do exactly ? You only have the input and output. So, how can you plot the bode ?
And then how do you deduce the poles and zeros from bode plot ?
 
  • #20
zoom1 said:
And then how do you deduce the poles and zeros from bode plot ?
If you are asking for methodology how to aproximate TF from Bode, then:
 
  • #21
zoom1 said:
How do you do exactly ? You only have the input and output. So, how can you plot the bode ?
And then how do you deduce the poles and zeros from bode plot ?

to evaluate that the poles and zeros are correct you need to observe the frequency response, as seen in the bode plot, and explained by zoki.

To get the bode plot from a time based simulation environment such as simulink (and a time based environment such as real life!) , you have to realize what the frequency response is. It's the gain (output/input) with respect to frequency. So you simply vary the frequency of the input, look at the STEADY STATE gain, and that's all she wrote.

Now doing that is easier said than done, you can brute force it by simply varying the input and capturing the data, or using an array with various step sizes and multiple models. Then you would export the data to MATLAB to analyze.

That being said the engineers at mathworks are smart and provide you with tools! see below
http://www.mathworks.com/help/slcon...ency-response-using-linear-analysis-tool.html

If you don't have the control systems toolbox, I'm not sure of any easy way to do it other than brute force. If you have to brute force, be smart about the frequencies you pick. Look at the expect bode plot and think about what you need to check
 

What is "Full State Feedback"?

Full State Feedback is a control technique used in control theory to design controllers for a system. It involves using the full state of the system, which includes all the variables and their derivatives, to determine the control input.

What are the advantages of using Full State Feedback?

Full State Feedback provides better control performance compared to other control techniques as it takes into account all the variables of the system. It also allows for more precise and accurate control of the system.

How is Full State Feedback implemented?

Full State Feedback is implemented by using a mathematical model of the system to determine the control input based on the full state of the system. This can be done using techniques such as pole placement or linear quadratic regulator (LQR).

Can Full State Feedback be used for any system?

No, Full State Feedback can only be used for systems with measurable states. This means that the states of the system can be accurately measured or estimated.

What are the limitations of Full State Feedback?

One of the limitations of Full State Feedback is that it requires accurate knowledge of the system's dynamics and parameters. It also may not be feasible for large and complex systems due to the computational resources required.

Similar threads

Replies
31
Views
2K
  • Electrical Engineering
Replies
17
Views
2K
  • Electrical Engineering
Replies
4
Views
1K
  • Electrical Engineering
Replies
5
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
0
Views
776
Replies
13
Views
4K
  • Electrical Engineering
Replies
3
Views
1K
Replies
4
Views
1K
Replies
5
Views
264
  • Electrical Engineering
Replies
3
Views
793
Back
Top