Second order active filter
Copyright (C) 2022 Miodrag Bolic
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details <https://www.gnu.org/licenses/>.
% Changing the path from main_folder to a particular chapter
main_path=fileparts(which('Main_Content.mlx'));
%addpath(append(main_path,'/Chapter2'))
cd (append(main_path,'/Chapter3/RC Circuit and Filters'))
addpath(append(main_path,'/Service'))
SAVE_FLAG=1; % saving the figures in a file
Introduction
% Exact linearization of the Simulink model filter_80hz
model = 'SallenKeyFilter';
Specify the analysis I/Os
Get the analysis I/Os from the model
Specify the operating point
Use the model initial condition
Linearize the model
sys = linearize(model,io,op);
Plot the resulting linearization
setoptions(h,'FreqUnits','Hz','PhaseVisible','on');
p = bodeoptions('cstprefs');
exportgraphics(gcf,"Fig3.19.jpg", 'Resolution',600)