Here is how the app. looks like:

Here's the example of the harmonic oscillator modelling and step response:

X(t+1) = A X(t) + B U(t)

Y(t+1) = C X(t) + D U(t)

U and Y are 2 value vectors

X is n values (let's say 20)

A is square matrix describing system dynamics

B and D are 2 * 20 matrices

C is 20 * 2 matrices

With this model you can describe any (limited to X size dynamic order) 2x2 linear system

Nice work!

The state space is certainly an option. Any DSP code can be simply added to the file

https://github.com/dashpi/RedPitaya/blo ... fpga_lti.c

from line 367 on and compiled.

Arrays cha_state, chb_state or other arrays can be used to register the state X, while the arrays

cha_dsp_par, chb_dsp_par can be used to pass the system parameters ABCD.

In SS you can even extend the app. to a 2x2 MIMO by using both inputs and outputs.

I think with SS is more convenient to pass the matrixes through files.

I have one question. When I set a0 and b0 to 1 and others be 0. Is there must be some gain on the signal? The output I got is about 2 times than the input

@bingoiceono: On my Redpitaya it works fine even with your filter settings. The signals have equal amplitudes. I'm using one of the Redpitaya outputs to generate the input signal + "generate" command. How are you feeding your Redpitaya input?

### Who is online

Users browsing this forum: microwavejoe and 1 guest