Transimpedance Amplifier transfer function behaving differently in Matlab as well as Simulink than expected
Ältere Kommentare anzeigen
Added reference code and pictures for the reference
-For the given TIA transfer function of gain 158.8dB at 3KHz frequency -
-I have i_mean = 3.5763e-9 and amp = 1.7881e-9 (variable input in the code)
-which means my G_TIA output should give me a wave of peak to peak between 0.1557V and 0.4672V and mean 0.3115V. (Expected Results)
Issue - After using lsim (and even when used in Simulink model) - the TIA peak to peak gives me about 0.2V to 0.51V - with mean about 0.35V. (Simulated Results)
- This simulated output are 0.05V higher than the calculated (expected) ones (when multiplied by the TIA gain with the input wave)
- what could be the issue? Might it be the numerical solver issue or something else?
clc;
clear all;
G_TIA_num = [-6666666666666.7 -5.5555555555556E+23];
G_TIA_den = [1 166666700000 5.5555555555556E+15];
G_TIA = tf(G_TIA_num,G_TIA_den);
fs = 1e6; % Sampling frequency
t = 0:1/fs:0.1; % Time vector
f = 3000; % Sine wave frequency in Hz
mean_current = i_mean; % Mean current (A)
amp = (i_mean*1.5 - i_mean*0.5) / 2; % Amplitude (A)
u = i_mean + amp * sin(2*pi*f*t); % Input signal
[y, t_out] = lsim(G_TIA, u, t);
figure(1);
plot(t_out, y);
xlabel('Time (s)');
ylabel('TIA Output Voltage (V)');
title('TIA Response');
grid on;

Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu General Applications finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
