[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
sigma(sys) singular value plot in Octave for a MIMO System
From: |
paramaniac |
Subject: |
sigma(sys) singular value plot in Octave for a MIMO System |
Date: |
Sun, 7 Jun 2009 01:07:54 -0700 (PDT) |
Dear Octave Community
I wrote a model of a simplified heat exchanger and I tried to plot its
singular values over a range of frequencies. In Matlab, there's a command
called sigma(sys) that does the job conveniently. However, I haven't found
an equivalent in Octave yet. So I tried to write a routine by hand, but I
failed miserably ;-) The only thing I managed to compute was the singular
values at a fixed frequency. Does somebody know how to plot them over a
whole range of frequencies, say logspace(-3,1,1000)?
Thanks in advance for every help
Regards
Lukas
% Heat Exchanger
clear all;
close all;
clc;
% Physical Parameters
m_star_1 = 0.5; % kg/s
m_star_2 = 0.2; % kg/s
V_1 = 0.01; % m^3
V_2 = 0.02; % m^3
rho = 1000; % kg/m^3
c = 4200; % J/(kg K)
Ar = 2; % m^2
k = 2000; % W/(m^2 K)
% Control-Oriented Parameters
tau_1 = rho * V_1 * c / ( m_star_1 * c + k * Ar );
tau_2 = rho * V_2 * c / ( m_star_2 * c + k * Ar );
sigma_1 = k * Ar / ( m_star_1 * c + k * Ar );
sigma_2 = k * Ar / ( m_star_2 * c + k * Ar );
beta_1 = m_star_1 * c / ( m_star_1 * c + k * Ar );
beta_2 = m_star_2 * c / ( m_star_2 * c + k * Ar );
% System Matrices
A = [ -1/tau_1 sigma_1/tau_1 ;
sigma_2/tau_2 -1/tau_2 ];
B = [ beta_1/tau_1 0 ;
0 beta_2/tau_2 ];
C = [ 1 0 ;
0 1 ];
D = [ 0 0 ;
0 0 ];
sys = ss(A,B,C,D);
w_0 = 0.1 %logspace(-3,1,1000) % rad/s
P = C * inv(i*w_0*eye(2) - A) * B + D
sigma = svd(P)
sigma_max = sigma(1)
sigma_min = sigma(2)
semilogx(sigma_max, w_0, sigma_min, w_0)
--
View this message in context:
http://www.nabble.com/sigma%28sys%29-singular-value-plot-in-Octave-for-a-MIMO-System-tp23908210p23908210.html
Sent from the Octave - General mailing list archive at Nabble.com.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- sigma(sys) singular value plot in Octave for a MIMO System,
paramaniac <=