Email: helpdesk@telkomuniversity.ac.id

This Portal for internal use only!

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • IBM
  • Visual Paradigm
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Categories
  • Microsoft
    • Microsoft Apps
    • Office
    • Operating System
    • VLS
    • Developer Tools
    • Productivity Tools
    • Database
    • AI + Machine Learning
    • Middleware System
    • Learning Services
    • Analytics
    • Networking
    • Compute
    • Security
    • Internet Of Things
  • Adobe
  • Matlab
  • Google
  • Visual Paradigm
  • WordPress
    • Plugin WP
    • Themes WP
  • Opensource
  • Others
More Categories Less Categories
  • Get Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • My Account
    • Download
    • Cart
    • Checkout
    • Login
  • About Us
    • Contact
    • Forum
    • Frequently Questions
    • Privacy Policy
  • Forum
    • News
      • Category
      • News Tag

iconTicket Service Desk

  • My Download
  • Checkout
Application Package Repository Telkom University
All Categories

All Categories

  • IBM
  • Visual Paradigm
  • Adobe
  • Google
  • Matlab
  • Microsoft
    • Microsoft Apps
    • Analytics
    • AI + Machine Learning
    • Compute
    • Database
    • Developer Tools
    • Internet Of Things
    • Learning Services
    • Middleware System
    • Networking
    • Operating System
    • Productivity Tools
    • Security
    • VLS
      • Office
      • Windows
  • Opensource
  • Wordpress
    • Plugin WP
    • Themes WP
  • Others

Search

0 Wishlist

Cart

Menu
  • Home
    • Download Application Package Repository Telkom University
    • Application Package Repository Telkom University
    • Download Official License Telkom University
    • Download Installer Application Pack
    • Product Category
    • Simple Product
    • Grouped Product
    • Variable Product
    • External Product
  • All Pack
    • Microsoft
      • Operating System
      • Productivity Tools
      • Developer Tools
      • Database
      • AI + Machine Learning
      • Middleware System
      • Networking
      • Compute
      • Security
      • Analytics
      • Internet Of Things
      • Learning Services
    • Microsoft Apps
      • VLS
    • Adobe
    • Matlab
    • WordPress
      • Themes WP
      • Plugin WP
    • Google
    • Opensource
    • Others
  • My account
    • Download
    • Get Pack
    • Cart
    • Checkout
  • News
    • Category
    • News Tag
  • Forum
  • About Us
    • Privacy Policy
    • Frequently Questions
    • Contact
Home/Matlab/Designing an Output Zeroing Input for an LTI Discrete-Time System in MATLAB

Designing an Output Zeroing Input for an LTI Discrete-Time System in MATLAB

PuTI / 2025-02-03
Designing an Output Zeroing Input for an LTI Discrete-Time System in MATLAB
Matlab News

I am working with an LTI discrete-time system and trying to design an output zeroing input based on its invariant zeros, zero direction input, and zero direction state. My goal is to write an MATLAB script (mfile) that demonstrates how the output remains zero for all time steps when the appropriate input and initial state are applied.
Here’s what I have done so far:
I defined the system matrices A,B,C,D.
I computed the invariant zeros using the tzero function.
For one of the invariant zero, I constructed the rosenbrock matrix [zI−A,−B;C,D] and computed its null space to obtain the zero direction state ​ and zero direction input ​.
I simulated the system by two approach 1-using lsim with the designed input sequence ​zand the initial state2- solving discrete time state space equation
However the output is not exactly zero and by changing the sampling time the response changes. It should be noted that when a smaller sampling time is chosen (e.g., Ts=0.01Ts​=0.01), the output response becomes worse, whereas increasing the sampling time (e.g., Ts=0.1Ts​=0.1) results in a response closer to zero. How should a correct and realistic simulation be performed especially when the system’s sampling time is fixed and cannot be changed? I would appreciate it if someone could review my code and suggest improvements or point out any mistakes.
clc
clear all
close all
%% Parameters of the Plant discrete-time model
Ac_xe=[0 1 0;0 0 1;-0.57375 -2.0775 -2.5]
Bc_a=[0;0;1]
Cc_xe=[1.1 1 0]
Dc_xe=0;

n=3; %%% states number
p=1; %% output number
m=1 %%input number
Ts=0.01; %% sampling time
td=0.01;

time=0:td:10;
plant=ss(Ac_xe,Bc_a,Cc_xe,Dc_xe,Ts);
Zcl=tzero(plant)
za=Zcl(find(abs(Zcl)>1))

P_Rosenbrock=[za*eye(n)-Ac_xe -Bc_a;Cc_xe Dc_xe]
zero_direc1=null(P_Rosenbrock)
xc(:,1)=(zero_direc1(1:n,1));

%%firstmethod
for k=1:length(time)
sig_nf(k)=(zero_direc1(n+1:n+m,1))*(za^(k-1));

xc(:,k+1)=Ac_xe*xc(:,k)+Bc_a*sig_nf(k);
end
yc=(Cc_xe*xc(:,1:length(time)))+(Dc_xe*sig_nf);
figure(1)
subplot(3,1,2)
plot(time,yc,’LineWidth’,1.5)
xlabel(‘time(second)’)
ylabel(‘y’)

second mfile with lsim

clc
clear all
close all
%% Parameters of the Plant discrete-time model
Ac_xe=[0 1 0;0 0 1;-0.57375 -2.0775 -2.5]
Bc_a=[0;0;1]
Cc_xe=[1.1 1 0]
Dc_xe=0;

n=3; %%% states number
p=1; %% output number
m=1 %%input number
Ts=0.01; %% sampling time
td=0.01;

time=0:td:10;
plant=ss(Ac_xe,Bc_a,Cc_xe,Dc_xe,Ts);
Zcl=tzero(plant)
za=Zcl(find(abs(Zcl)>1))

P_Rosenbrock=[za*eye(n)-Ac_xe -Bc_a;Cc_xe Dc_xe]
zero_direc1=null(P_Rosenbrock)
xc(:,1)=(zero_direc1(1:n,1));

for k=1:length(time)
sig_nf(k)=(zero_direc1(n+1:n+m,1))*(za^(k-1));
end
[yc,t,xc]=lsim(plant,(sig_nf)’,time,zero_direc1(1:n,1));

figure(1)
subplot(3,1,2)
plot(time,yc,’LineWidth’,1.5)
xlabel(‘time(second)’)
ylabel(‘y’)I am working with an LTI discrete-time system and trying to design an output zeroing input based on its invariant zeros, zero direction input, and zero direction state. My goal is to write an MATLAB script (mfile) that demonstrates how the output remains zero for all time steps when the appropriate input and initial state are applied.
Here’s what I have done so far:
I defined the system matrices A,B,C,D.
I computed the invariant zeros using the tzero function.
For one of the invariant zero, I constructed the rosenbrock matrix [zI−A,−B;C,D] and computed its null space to obtain the zero direction state ​ and zero direction input ​.
I simulated the system by two approach 1-using lsim with the designed input sequence ​zand the initial state2- solving discrete time state space equation
However the output is not exactly zero and by changing the sampling time the response changes. It should be noted that when a smaller sampling time is chosen (e.g., Ts=0.01Ts​=0.01), the output response becomes worse, whereas increasing the sampling time (e.g., Ts=0.1Ts​=0.1) results in a response closer to zero. How should a correct and realistic simulation be performed especially when the system’s sampling time is fixed and cannot be changed? I would appreciate it if someone could review my code and suggest improvements or point out any mistakes.
clc
clear all
close all
%% Parameters of the Plant discrete-time model
Ac_xe=[0 1 0;0 0 1;-0.57375 -2.0775 -2.5]
Bc_a=[0;0;1]
Cc_xe=[1.1 1 0]
Dc_xe=0;

n=3; %%% states number
p=1; %% output number
m=1 %%input number
Ts=0.01; %% sampling time
td=0.01;

time=0:td:10;
plant=ss(Ac_xe,Bc_a,Cc_xe,Dc_xe,Ts);
Zcl=tzero(plant)
za=Zcl(find(abs(Zcl)>1))

P_Rosenbrock=[za*eye(n)-Ac_xe -Bc_a;Cc_xe Dc_xe]
zero_direc1=null(P_Rosenbrock)
xc(:,1)=(zero_direc1(1:n,1));

%%firstmethod
for k=1:length(time)
sig_nf(k)=(zero_direc1(n+1:n+m,1))*(za^(k-1));

xc(:,k+1)=Ac_xe*xc(:,k)+Bc_a*sig_nf(k);
end
yc=(Cc_xe*xc(:,1:length(time)))+(Dc_xe*sig_nf);
figure(1)
subplot(3,1,2)
plot(time,yc,’LineWidth’,1.5)
xlabel(‘time(second)’)
ylabel(‘y’)

second mfile with lsim

clc
clear all
close all
%% Parameters of the Plant discrete-time model
Ac_xe=[0 1 0;0 0 1;-0.57375 -2.0775 -2.5]
Bc_a=[0;0;1]
Cc_xe=[1.1 1 0]
Dc_xe=0;

n=3; %%% states number
p=1; %% output number
m=1 %%input number
Ts=0.01; %% sampling time
td=0.01;

time=0:td:10;
plant=ss(Ac_xe,Bc_a,Cc_xe,Dc_xe,Ts);
Zcl=tzero(plant)
za=Zcl(find(abs(Zcl)>1))

P_Rosenbrock=[za*eye(n)-Ac_xe -Bc_a;Cc_xe Dc_xe]
zero_direc1=null(P_Rosenbrock)
xc(:,1)=(zero_direc1(1:n,1));

for k=1:length(time)
sig_nf(k)=(zero_direc1(n+1:n+m,1))*(za^(k-1));
end
[yc,t,xc]=lsim(plant,(sig_nf)’,time,zero_direc1(1:n,1));

figure(1)
subplot(3,1,2)
plot(time,yc,’LineWidth’,1.5)
xlabel(‘time(second)’)
ylabel(‘y’) I am working with an LTI discrete-time system and trying to design an output zeroing input based on its invariant zeros, zero direction input, and zero direction state. My goal is to write an MATLAB script (mfile) that demonstrates how the output remains zero for all time steps when the appropriate input and initial state are applied.
Here’s what I have done so far:
I defined the system matrices A,B,C,D.
I computed the invariant zeros using the tzero function.
For one of the invariant zero, I constructed the rosenbrock matrix [zI−A,−B;C,D] and computed its null space to obtain the zero direction state ​ and zero direction input ​.
I simulated the system by two approach 1-using lsim with the designed input sequence ​zand the initial state2- solving discrete time state space equation
However the output is not exactly zero and by changing the sampling time the response changes. It should be noted that when a smaller sampling time is chosen (e.g., Ts=0.01Ts​=0.01), the output response becomes worse, whereas increasing the sampling time (e.g., Ts=0.1Ts​=0.1) results in a response closer to zero. How should a correct and realistic simulation be performed especially when the system’s sampling time is fixed and cannot be changed? I would appreciate it if someone could review my code and suggest improvements or point out any mistakes.
clc
clear all
close all
%% Parameters of the Plant discrete-time model
Ac_xe=[0 1 0;0 0 1;-0.57375 -2.0775 -2.5]
Bc_a=[0;0;1]
Cc_xe=[1.1 1 0]
Dc_xe=0;

n=3; %%% states number
p=1; %% output number
m=1 %%input number
Ts=0.01; %% sampling time
td=0.01;

time=0:td:10;
plant=ss(Ac_xe,Bc_a,Cc_xe,Dc_xe,Ts);
Zcl=tzero(plant)
za=Zcl(find(abs(Zcl)>1))

P_Rosenbrock=[za*eye(n)-Ac_xe -Bc_a;Cc_xe Dc_xe]
zero_direc1=null(P_Rosenbrock)
xc(:,1)=(zero_direc1(1:n,1));

%%firstmethod
for k=1:length(time)
sig_nf(k)=(zero_direc1(n+1:n+m,1))*(za^(k-1));

xc(:,k+1)=Ac_xe*xc(:,k)+Bc_a*sig_nf(k);
end
yc=(Cc_xe*xc(:,1:length(time)))+(Dc_xe*sig_nf);
figure(1)
subplot(3,1,2)
plot(time,yc,’LineWidth’,1.5)
xlabel(‘time(second)’)
ylabel(‘y’)

second mfile with lsim

clc
clear all
close all
%% Parameters of the Plant discrete-time model
Ac_xe=[0 1 0;0 0 1;-0.57375 -2.0775 -2.5]
Bc_a=[0;0;1]
Cc_xe=[1.1 1 0]
Dc_xe=0;

n=3; %%% states number
p=1; %% output number
m=1 %%input number
Ts=0.01; %% sampling time
td=0.01;

time=0:td:10;
plant=ss(Ac_xe,Bc_a,Cc_xe,Dc_xe,Ts);
Zcl=tzero(plant)
za=Zcl(find(abs(Zcl)>1))

P_Rosenbrock=[za*eye(n)-Ac_xe -Bc_a;Cc_xe Dc_xe]
zero_direc1=null(P_Rosenbrock)
xc(:,1)=(zero_direc1(1:n,1));

for k=1:length(time)
sig_nf(k)=(zero_direc1(n+1:n+m,1))*(za^(k-1));
end
[yc,t,xc]=lsim(plant,(sig_nf)’,time,zero_direc1(1:n,1));

figure(1)
subplot(3,1,2)
plot(time,yc,’LineWidth’,1.5)
xlabel(‘time(second)’)
ylabel(‘y’) lti systems, invariant zeros, output zeroing, matlab, discrete-time lit systems MATLAB Answers — New Questions

​

Tags: matlab

Share this!

Related posts

Warning: Error updating FunctionLine in using fplot
2025-05-12

Warning: Error updating FunctionLine in using fplot

Solid creation Simulink, simscape multibody: stuck in loading
2025-05-12

Solid creation Simulink, simscape multibody: stuck in loading

Issues with EMG Signal Acquisition via Simulink Desktop Real-Time (SDRT) and DAQ Board Usage
2025-05-12

Issues with EMG Signal Acquisition via Simulink Desktop Real-Time (SDRT) and DAQ Board Usage

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Search

Categories

  • Matlab
  • Microsoft
  • News
  • Other
Application Package Repository Telkom University

Tags

matlab microsoft opensources
Application Package Download License

Application Package Download License

Adobe
Google for Education
IBM
Matlab
Microsoft
Wordpress
Visual Paradigm
Opensource

Sign Up For Newsletters

Be the First to Know. Sign up for newsletter today

Application Package Repository Telkom University

Portal Application Package Repository Telkom University, for internal use only, empower civitas academica in study and research.

Information

  • Telkom University
  • About Us
  • Contact
  • Forum Discussion
  • FAQ
  • Helpdesk Ticket

Contact Us

  • Ask: Any question please read FAQ
  • Mail: helpdesk@telkomuniversity.ac.id
  • Call: +62 823-1994-9941
  • WA: +62 823-1994-9943
  • Site: Gedung Panambulai. Jl. Telekomunikasi

Copyright © Telkom University. All Rights Reserved. ch

  • FAQ
  • Privacy Policy
  • Term

This Application Package for internal Telkom University only (students and employee). Chiers... Dismiss