how to implement a non-causal system?
10 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
How do you implement a system like:
y(k+2)+2y(k+1)+1/2*y(k)=x(k+1)+x(k)
where x: input to the system and y: output of the system
What if you want to draw a block diagram for this system on paper or in simulink, how will you represent the time advancement?
Can anybody tell me what is the significance of such type of system?
1 Kommentar
Dr.Athar Ravish Khan
am 19 Jul. 2018
Bearbeitet: Walter Roberson
am 20 Jul. 2018
You do refer the code to test the causality of system
clc;
close all;
k=2;%delay
n=0:2+k;
x=[10 2 5 zeros(1,k)]; %x(n)
subplot(411)
stem(n,x)
xdelay=[zeros(1,k) x(1:3)]; %x(n-2)
subplot(412)
stem(n,xdelay)
y=x+n.*xdelay; %y(n)=x(n)+n*x(n-2)
% delayed output y'(n)=x(n-k)+(n-k)*x(n-k-2)
nk=(0:length(n)-1+k)-k;
ydelayed=[xdelay zeros(1,k)]+nk.*[zeros(1,k) xdelay]
subplot(413)
stem(0:length(ydelayed)-1,ydelayed)
n1=(0:length(n)-1+k);
ydin=[xdelay zeros(1,k)]+n1.*[zeros(1,k) xdelay] % output due to delayed input
subplot(414)
stem(0:length(ydin)-1,ydin)
%%ydelayed is not equal system is non causal
Antworten (4)
Walter Roberson
am 18 Jun. 2011
Bearbeitet: Walter Roberson
am 20 Jul. 2018
According to Maple's recurrence solver, if you have initial values for y(1) and y(2), then
y(k) = (1/4)*sqrt(2)*(Sum(((1/(-2+sqrt(2)))^(k-k0) * (2+sqrt(2)) + (2+sqrt(2))^(-k+k0) * (2*(-1)^(1+k-k0) + sqrt(2)*(-1)^(k-k0))) * (x(k0-2) + x(k0-1)), k0 = 3 .. k)) + (1/4*((6*y(1) + 4*y(2)) * sqrt(2) - 4*y(2) - 8*y(1))) * (-1-(1/2)*sqrt(2))^k - (3/2)*(-1+(1/2)*sqrt(2))^k * ((y(1) + (2/3)*y(2)) * sqrt(2) + (4/3)*y(1) + (2/3)*y(2))
What it means, I don't know.
[EDIT]
If you want to start with y(0) (you didn't say so I had to guess) then the formula becomes
y(k) = (1/4)*sqrt(2)*(Sum(((1/(-2+sqrt(2)))^(k-k0)*(2+sqrt(2))+(2+sqrt(2))^(-k+k0)*(2*(-1)^(1+k-k0)+sqrt(2)*(-1)^(k-k0)))*(x(k0-2)+x(k0-1)), k0 = 2 .. k))+(1/4*((-2*y(0)-2*y(1))*sqrt(2)+2*y(0)))*(-1-(1/2)*sqrt(2))^k+(1/2*((y(0)+y(1))*sqrt(2)+y(0)))*(-1+(1/2)*sqrt(2))^k
which is essentially identical in the summation but differs in the initialization.
According to this formula, the first several y(k) values starting at y(0) are:
y(0),
y(1), x[0]+x[1]-(1/2)*y(0)-2*y(1),
-2*x[0]-x[1]+x[2]+(7/2)*y(1)+y(0),
(7/2)*x[0]+(3/2)*x[1]-x[2]+x[3]-(7/4)*y(0)-6*y(1),
-6*x[0]-(5/2)*x[1]+(3/2)*x[2]-x[3]+x[4]+3*y(0)+(41/4)*y(1),
(41/4)*x[0]+(17/4)*x[1]-(5/2)*x[2]+(3/2)*x[3]-x[4]+x[5]-(41/8)*y(0)-(35/2)*y(1),
-(35/2)*x[0]-(29/4)*x[1]+(17/4)*x[2]-(5/2)*x[3]+(3/2)*x[4]-x[5]+x[6]+(35/4)*y(0)+(239/8)*y(1),
(239/8)*x[0]+(99/8)*x[1]-(29/4)*x[2]+(17/4)*x[3]-(5/2)*x[4]+(3/2)*x[5]-x[6]+x[7]-51*y(1)-(239/16)*y(0),
-51*x[0]-(169/8)*x[1]+(99/8)*x[2]-(29/4)*x[3]+(17/4)*x[4]-(5/2)*x[5]+(3/2)*x[6]-x[7]+x[8]+(51/2)*y(0)+(1393/16)*y(1),
(1393/16)*x[0]+(577/16)*x[1]-(169/8)*x[2]+(99/8)*x[3]-(29/4)*x[4]+(17/4)*x[5]-(5/2)*x[6]+(3/2)*x[7]-x[8]+x[9]-(1393/32)*y(0)-(1189/8)*y(1),
-(1189/8)*x[0]-(985/16)*x[1]+(577/16)*x[2]-(169/8)*x[3]+(99/8)*x[4]-(29/4)*x[5]+(17/4)*x[6]-(5/2)*x[7]+(3/2)*x[8]-x[9]+x[10]+(1189/16)*y(0)+(8119/32)*y(1),
(8119/32)*x[0]+(3363/32)*x[1]-(985/16)*x[2]+(577/16)*x[3]-(169/8)*x[4]+(99/8)*x[5]-(29/4)*x[6]+(17/4)*x[7]-(5/2)*x[8]+(3/2)*x[9]-x[10]+x[11]-(8119/64)*y(0)-(3465/8)*y(1),
-(3465/8)*x[0]-(5741/32)*x[1]+(3363/32)*x[2]-(985/16)*x[3]+(577/16)*x[4]-(169/8)*x[5]+(99/8)*x[6]-(29/4)*x[7]+(17/4)*x[8]-(5/2)*x[9]+(3/2)*x[10]-x[11]+x[12]+(3465/16)*y(0)+(47321/64)*y(1),
(47321/64)*x[0]+(19601/64)*x[1]-(5741/32)*x[2]+(3363/32)*x[3]-(985/16)*x[4]+(577/16)*x[5]-(169/8)*x[6]+(99/8)*x[7]-(29/4)*x[8]+(17/4)*x[9]-(5/2)*x[10]+(3/2)*x[11]-x[12]+x[13]-(47321/128)*y(0)-(40391/32)*y(1),
-(40391/32)*x[0]-(33461/64)*x[1]+(19601/64)*x[2]-(5741/32)*x[3]+(3363/32)*x[4]-(985/16)*x[5]+(577/16)*x[6]-(169/8)*x[7]+(99/8)*x[8]-(29/4)*x[9]+(17/4)*x[10]-(5/2)*x[11]+(3/2)*x[12]-x[13]+x[14]+(275807/128)*y(1)+(40391/64)*y(0)
You can see that each of these is essentially a linear combination of y(0) with y(1).
0 Kommentare
Bilawal
am 31 Jan. 2023
y(k) = (1/4)*sqrt(2)*(Sum(((1/(-2+sqrt(2)))^(k-k0) * (2+sqrt(2)) + (2+sqrt(2))^(-k+k0) * (2*(-1)^(1+k-k0) + sqrt(2)*(-1)^(k-k0))) * (x(k0-2) + x(k0-1)), k0 = 3 .. k)) + (1/4*((6*y(1) + 4*y(2)) * sqrt(2) - 4*y(2) - 8*y(1))) * (-1-(1/2)*sqrt(2))^k - (3/2)*(-1+(1/2)*sqrt(2))^k * ((y(1) + (2/3)*y(2)) * sqrt(2) + (4/3)*y(1) + (2/3)*y(2))
y(k) = (1/4)*sqrt(2)*(Sum(((1/(-2+sqrt(2)))^(k-k0)*(2+sqrt(2))+(2+sqrt(2))^(-k+k0)*(2*(-1)^(1+k-k0)+sqrt(2)*(-1)^(k-k0)))*(x(k0-2)+x(k0-1)), k0 = 2 .. k))+(1/4*((-2*y(0)-2*y(1))*sqrt(2)+2*y(0)))*(-1-(1/2)*sqrt(2))^k+(1/2*((y(0)+y(1))*sqrt(2)+y(0)))*(-1+(1/2)*sqrt(2))^k
0 Kommentare
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!