State-Space Matrices

์กฐํšŒ ์ˆ˜: 6 (์ตœ๊ทผ 30์ผ)
Aysel Alimirzayeva
Aysel Alimirzayeva 2022๋…„ 11์›” 3์ผ
๋Œ“๊ธ€: Aysel Alimirzayeva 2022๋…„ 11์›” 5์ผ
Hello.Why do we write A-B*K1 in the example of LQR Control using State-Space Matrices in Matlab?Why is B negative?If anyone knows,can you please explain?

์ฑ„ํƒ๋œ ๋‹ต๋ณ€

Sam Chak
Sam Chak 2022๋…„ 11์›” 3์ผ
It's because of negative feedback.
The LQR function only computes .
Making a substitution
  ๋Œ“๊ธ€ ์ˆ˜: 2
Aysel Alimirzayeva
Aysel Alimirzayeva 2022๋…„ 11์›” 4์ผ
@Sam Chak Than you very much.
Sam Chak
Sam Chak 2022๋…„ 11์›” 5์ผ
ํŽธ์ง‘: Sam Chak 2022๋…„ 11์›” 5์ผ
You're welcome, @Aysel Alimirzayeva.
Just for a note, this "state-feedback"
sys1 = ss(A-B*K1, B, C, D)
only works if your reference state is 0.
If your system is tracking a non-zero reference state, then a pre-compensator N is required to be placed at the reference input. N is just a constant gain to rescale input so that the output converges to 1 in the step response
sys2 = ss(A-B*K1, N*B, C, D)

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์ถ”๊ฐ€ ๋‹ต๋ณ€ (1๊ฐœ)

Sam Chak
Sam Chak 2022๋…„ 11์›” 5์ผ
I added a simple example to show you. If you like this example, consider voting ๐Ÿ‘ the Answer. Thanks!
Say, the reference state is 1.
A = [0 1; 2 3];
B = [0; 1];
K1 = lqr(A, B, eye(2), 1)
K1 = 1ร—2
4.2361 7.2979
sys1 = ss(A-B*K1, B, [1 0], 0)
sys1 = A = x1 x2 x1 0 1 x2 -2.236 -4.298 B = u1 x1 0 x2 1 C = x1 x2 y1 1 0 D = u1 y1 0 Continuous-time state-space model.
step(sys1, 20)
The step response shows that the output won't reach 1. Thus, a pre-compensator is needed:
N = 1/dcgain(sys1) % pre-compensator
N = 2.2361
sys2 = ss(A-B*K1, N*B, [1 0], 0)
sys2 = A = x1 x2 x1 0 1 x2 -2.236 -4.298 B = u1 x1 0 x2 2.236 C = x1 x2 y1 1 0 D = u1 y1 0 Continuous-time state-space model.
step(sys2, 20)
  ๋Œ“๊ธ€ ์ˆ˜: 1
Aysel Alimirzayeva
Aysel Alimirzayeva 2022๋…„ 11์›” 5์ผ
Thank you very much for the detailed further explanation.

๋Œ“๊ธ€์„ ๋‹ฌ๋ ค๋ฉด ๋กœ๊ทธ์ธํ•˜์‹ญ์‹œ์˜ค.

์นดํ…Œ๊ณ ๋ฆฌ

Help Center ๋ฐ File Exchange์—์„œ State-Space Control Design์— ๋Œ€ํ•ด ์ž์„ธํžˆ ์•Œ์•„๋ณด๊ธฐ

ํƒœ๊ทธ

์ œํ’ˆ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by