• 状态变量表达形式中-状态变量的转换 eg: x1->x2


    状态控制表达中-状态变量的转换

    Transformation: State Space ↔ State Space

    系统的状态变量表示不是唯一的。事实上,有无穷多的表现形式。下面将讨论从一组状态变量转换到另一组状态变量的方法,并给出一个示例。

     

     

     1 Use MatLab to convert from state space to state space (symbolic)
     2 This script requires the MatLab's symbolic toolbox
     3 
     4 % Start by clearing everything
     5 clear all
     6 clc
     7 format compact
     8 Declare all symbolic variables
     9 
    10 syms k1 k2 b m
    11 Define state space system
    12 
    13 A=[0 1 0; -(k1+k2)/m 0 k1/m; k1/b 0 -k1/b];
    14 B=[0; 1/m; 0];
    15 C=[0 0 1];
    16 D=0;
    17 
    18 Define state transformation matrix and find its inverse
    19 
    20 T=[1/2 0 1/2; -1 0 1; 0 1 0;];
    21 Tinv=inv(T)
    22 Tinv =
    23          1.0000   -0.5000         0
    24          0         0    1.0000
    25          1.0000    0.5000         0
    26 
    27 Find new state space system
    28 
    29 % Ahat
    30 Ahat = simplify(T*A*Tinv)
    31 
    32 % Bhat
    33 Bhat = T*B
    34 
    35 % Chat
    36 Chat = C*Tinv
    37 
    38 % Dhat
    39 Dhat = D
    40 Ahat =
    41           [     0,         -k1/(2*b), 1/2]
    42           [     0,             -k1/b,  -1]
    43           [ -k2/m, (2*k1 + k2)/(2*m),   0]
    44 Bhat =
    45           0
    46           0
    47          1/m
    48 Chat =
    49            1.0000    0.5000         0
    50 Dhat =
    51            0
    View Code
    本文版权归作者和博客园所有,欢迎转载,但请在文章也页面明显位置给出原文链接。如对文章有任何意见或者建议,欢迎评论。个人才疏学浅,文章如有错误,欢迎指正,也欢迎大家分享交流自己更好的方法! 此外有时由于太懒不是自己写上去的,引用了一些大佬的文章,如有忘记备注原文内容链接,实非故意。
  • 相关阅读:
    编译内核开始的小问题Unable to find the Ncurses libraries
    qq for linux Ubuntu 64位兼容
    ubuntu下安装lighttpd
    搭建boa服务器
    INI file and Iniparser
    kernel常用.gitignore配置
    光谱学习
    jump to case label fpermissive
    Qt通用方法及类库5
    Qt通用方法及类库1
  • 原文地址:https://www.cnblogs.com/csymemory/p/14267392.html
Copyright © 2020-2023  润新知