⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dotrim.m

📁 《嵌入式控制系统及其CC++实现-面向使用Matlab的软件开发者》源码
💻 M
字号:
% Embedded Control Systems in C/C++
% by Jim Ledin
%
% Chapter 7 - Aircraft glideslope control design example
% This file uses the Simulink model Glideslope.mdl.

clear all
close all

% Set up the initial states
x0 = [81.8 -3*pi/180 0]';
ix = [1 2 3];
u0 = [2*pi/180; 50000];
iu = [];
y0 = [];
iy = [];

alpha_trim = 0;
T_trim = 0;

% Perform the trim procedure
[x,u,y,dx]=trim('glideslope', x0, u0, y0, ix, iu, iy);

% Extract the trim angle of attack and thrust values
alpha_trim = u(1)
T_trim = u(2)

u0 = [0 0];

% Extract a linear model about the trim conditions
[a,b,c,d] = linmod('glideslope', x0, u0);
ssplant = ss(a,b,c,d);
set(ssplant, 'InputName', {'alpha','T'}, 'StateName', {'V','gamma','h_err'}, ...
    'OutputName', {'V','gamma','h_err'})
ssplant

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -