%variables R_f = 3.6e3; % Total Resistance [ohms] of the fluid R_m = 2e3; %Resistance [ohms] of the membrane C_m = 5.6e-11; % Capacitance [farads] of the membrane %C_m = e*A/d = 8*e0*(200 um^2)(50 nm) = 56pF (silicon nitride membrane, solid) %R_f = 2x branches of p*d/A f = logspace(-2,9,500); %frequency Scan (.01 to 1e6 hz) Z_m = R_m./(1i*2*pi*R_m*C_m.*f+1); % Impedence of the membrane (RC circuit) Z_tot = R_f + Z_m; %total circuit behavior %% figure, subplot(2,1,1) plot (f,log10(abs(Z_tot))); %log impedance set(gca,'xscale','log') set(gca,'yscale','log') xlabel('Frequency [Hz]') ylabel('Impedance [dB]') title('Bode Plot'); subplot(2,1,2) plot (f,(180/pi)*angle(Z_tot)); set(gca,'xscale','log') xlabel('Frequency [Hz]') ylabel('Phase [Degrees]') title('Phase Plot'); % set(gca,'yscale','log')