Model { Name "am_env_filt" Version 2.09 SimParamPage Solver SampleTimeColors off InvariantConstants off WideVectorLines off ShowLineWidths off PaperOrientation landscape PaperType usletter PaperUnits inches StartTime "0.0" StopTime "1000" Solver ode45 RelTol "1e-3" AbsTol "1e-3" Refine "1" MaxStep ".01" InitialStep "auto" FixedStep "auto" MaxOrder 5 OutputOption RefineOutputTimes OutputTimes "[]" LoadExternalInput off ExternalInput "[t, u]" SaveTime off TimeSaveName "tout" SaveState off StateSaveName "xout" SaveOutput off OutputSaveName "yout" LoadInitialState off InitialState "xInitial" SaveFinalState off FinalStateName "xFinal" LimitMaxRows off MaxRows "1000" Decimation "1" AlgebraicLoopMsg warning MinStepSizeMsg warning UnconnectedInputMsg warning UnconnectedOutputMsg warning UnconnectedLineMsg warning ConsistencyChecking off ZeroCross on SimulationMode normal RTWSystemTargetFile "grt.tlc" RTWInlineParameters off RTWRetainRTWFile off RTWTemplateMakefile "grt_unix.tmf" RTWMakeCommand "make_rtw" RTWGenerateCodeOnly off ExtModeMexFile "ext_comm" ExtModeBatchMode off BlockDefaults { Orientation right ForegroundColor black BackgroundColor white DropShadow off NamePlacement normal FontName "Helvetica" FontSize 10 FontWeight normal FontAngle normal ShowName on } AnnotationDefaults { HorizontalAlignment center VerticalAlignment middle ForegroundColor black BackgroundColor white DropShadow off FontName "Helvetica" FontSize 10 FontWeight normal FontAngle normal } LineDefaults { FontName "Helvetica" FontSize 9 FontWeight normal FontAngle normal } System { Name "am_env_filt" Location [313, 56, 964, 356] Open on ScreenColor white Block { BlockType Sin Name "Carrier" Position [220, 180, 240, 200] Amplitude "1" Frequency "10" Phase "0" SampleTime "-1" } Block { BlockType ZeroPole Name "Chebychev Type II\nLP Filter" Position [465, 129, 525, 181] Zeros "z" Poles "p" Gain "k" MaskType "cheb2ap" MaskDescription "Chebyshev type II low pass filter.\n(Requires " "Signal Processing Toolbox)" MaskHelp "Analog Chebychev type II low pass filter " "using MATLAB's cheb2ap command." MaskPromptString "Cutoff frequency (rad/sec):|Order:|Db ripple " "down in stopband:" MaskStyleString "edit,edit,edit" MaskInitialization "[z,p,k]=cheb2ap(@2,@3); z=@1*z; p=@1*p; k=real(p" "rod(-p)/prod(-z)); [num,den]=zp2tf(z,p,k); " "w=logspace(log10(@1/10),log10(10*@1),50); " "h=freqs(num,den,w); " MaskDisplay "plot(20*log10(w),20*log10(abs(h)))" MaskIconFrame on MaskIconOpaque on MaskIconRotate none MaskIconUnits autoscale MaskValueString "2|2|20" } Block { BlockType Constant Name "Constant" Position [55, 135, 75, 155] Value "1" } Block { BlockType Constant Name "Constant1" Position [350, 170, 370, 190] Value "0" } Block { BlockType Switch Name "Diode" Position [395, 139, 425, 171] Threshold "0" } Block { BlockType SubSystem Name "Envelope" Ports [1, 0, 0, 0, 0] Position [585, 136, 615, 174] CopyFcn "set_param(gcb,'userdata',[]);" DeleteFcn "y_tp=get_param(gcb,'userdata');if ishandle(y_tp)" ",delete(y_tp);end" NameChangeFcn "set(get_param(gcb,'userdata'),'Name',gcb);" ShowPortLabels off MaskType "Graph scope." MaskDescription "Graph scope using MATLAB graph window.\nEnter " "plotting ranges and line type." MaskHelp "This block plots to the MATLAB graph window " "and can be used as an improved version of " "the Scope block. Look at the m-file sfuny.m " "to see how it works. This block can take " "scalar or vector input signal." MaskPromptString "Time range:|y-min:|y-max:|Line type (rgbw-:*). " "Seperate each plot by '/':" MaskStyleString "edit,edit,edit,edit" MaskInitialization "color = @4; ax = [0, @1, @2, @3]; dt = -1;" MaskDisplay "plot(0,0,100,100,[90,10,10,10,90,90,10],[65,65,9" "0,40,40,90,90],[90,78,69,54,40,31,25,10],[77,60," "48,46,56,75,81,84])" MaskIconFrame on MaskIconOpaque on MaskIconRotate none MaskIconUnits autoscale MaskValueString "15|-2.5|2.5|'r-/g--/c-./w:/m*/ro/b+'" System { Name "Envelope" Location [0, 59, 274, 252] Open off ScreenColor white Block { BlockType Inport Name "x" Position [65, 55, 85, 75] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType S-Function Name "S-function\nM-file which plots\nlines\n" Ports [1, 0, 0, 0, 0] Position [130, 55, 180, 75] FunctionName "sfuny" Parameters "ax, color,dt" } Line { SrcBlock "x" SrcPort 1 DstBlock "S-function\nM-file which plots\nlines\n" DstPort 1 } } } Block { BlockType Sin Name "Message m(t)" Position [55, 85, 75, 105] Amplitude "1" Frequency "1" Phase "1" SampleTime "-1" } Block { BlockType SubSystem Name "Modulated signal" Ports [1, 0, 0, 0, 0] Position [385, 51, 415, 89] CopyFcn "set_param(gcb,'userdata',[]);" DeleteFcn "y_tp=get_param(gcb,'userdata');if ishandle(y_tp)" ",delete(y_tp);end" NameChangeFcn "set(get_param(gcb,'userdata'),'Name',gcb);" ShowPortLabels off MaskType "Graph scope." MaskDescription "Graph scope using MATLAB graph window.\nEnter " "plotting ranges and line type." MaskHelp "This block plots to the MATLAB graph window " "and can be used as an improved version of " "the Scope block. Look at the m-file sfuny.m " "to see how it works. This block can take " "scalar or vector input signal." MaskPromptString "Time range:|y-min:|y-max:|Line type (rgbw-:*). " "Seperate each plot by '/':" MaskStyleString "edit,edit,edit,edit" MaskInitialization "color = @4; ax = [0, @1, @2, @3]; dt = -1;" MaskDisplay "plot(0,0,100,100,[90,10,10,10,90,90,10],[65,65,9" "0,40,40,90,90],[90,78,69,54,40,31,25,10],[77,60," "48,46,56,75,81,84])" MaskIconFrame on MaskIconOpaque on MaskIconRotate none MaskIconUnits autoscale MaskValueString "15|-2.5|2.5|'r-/g--/c-./w:/m*/ro/b+'" System { Name "Modulated signal" Location [0, 59, 274, 252] Open off ScreenColor white Block { BlockType Inport Name "x" Position [65, 55, 85, 75] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType S-Function Name "S-function\nM-file which plots\nlines\n" Ports [1, 0, 0, 0, 0] Position [130, 55, 180, 75] FunctionName "sfuny" Parameters "ax, color,dt" } Line { SrcBlock "x" SrcPort 1 DstBlock "S-function\nM-file which plots\nlines\n" DstPort 1 } } } Block { BlockType SubSystem Name "Plot k m(t)" Ports [1, 0, 0, 0, 0] Position [210, 16, 240, 54] CopyFcn "set_param(gcb,'userdata',[]);" DeleteFcn "y_tp=get_param(gcb,'userdata');if ishandle(y_tp)" ",delete(y_tp);end" NameChangeFcn "set(get_param(gcb,'userdata'),'Name',gcb);" ShowPortLabels off MaskType "Graph scope." MaskDescription "Graph scope using MATLAB graph window.\nEnter " "plotting ranges and line type." MaskHelp "This block plots to the MATLAB graph window " "and can be used as an improved version of " "the Scope block. Look at the m-file sfuny.m " "to see how it works. This block can take " "scalar or vector input signal." MaskPromptString "Time range:|y-min:|y-max:|Line type (rgbw-:*). " "Seperate each plot by '/':" MaskStyleString "edit,edit,edit,edit" MaskInitialization "color = @4; ax = [0, @1, @2, @3]; dt = -1;" MaskDisplay "plot(0,0,100,100,[90,10,10,10,90,90,10],[65,65,9" "0,40,40,90,90],[90,78,69,54,40,31,25,10],[77,60," "48,46,56,75,81,84])" MaskIconFrame on MaskIconOpaque on MaskIconRotate none MaskIconUnits autoscale MaskValueString "15|-2.5|2.5|'r-/g--/c-./w:/m*/ro/b+'" System { Name "Plot k m(t)" Location [0, 59, 274, 252] Open off ScreenColor white Block { BlockType Inport Name "x" Position [65, 55, 85, 75] Port "1" PortWidth "-1" SampleTime "-1" } Block { BlockType S-Function Name "S-function\nM-file which plots\nlines\n" Ports [1, 0, 0, 0, 0] Position [130, 55, 180, 75] FunctionName "sfuny" Parameters "ax, color,dt" } Line { SrcBlock "x" SrcPort 1 DstBlock "S-function\nM-file which plots\nlines\n" DstPort 1 } } } Block { BlockType Product Name "Product" Ports [2, 1, 0, 0, 0] Position [295, 143, 325, 167] Inputs "2" } Block { BlockType Reference Name "Slider\nGain" Ports [1, 1, 0, 0, 0] Position [115, 80, 160, 110] SourceBlock "simulink/Linear/Slider\nGain" SourceType "Slider Gain" low "0" gain "0.9" high "2" } Block { BlockType Sum Name "Sum" Ports [2, 1, 0, 0, 0] Position [220, 90, 240, 110] Inputs "++" } Line { SrcBlock "Chebychev Type II\nLP Filter" SrcPort 1 DstBlock "Envelope" DstPort 1 } Line { SrcBlock "Diode" SrcPort 1 DstBlock "Chebychev Type II\nLP Filter" DstPort 1 } Line { SrcBlock "Constant1" SrcPort 1 Points [0, -15] DstBlock "Diode" DstPort 3 } Line { SrcBlock "Product" SrcPort 1 Points [0, 0] Branch { DstBlock "Diode" DstPort 2 } Branch { Points [25, 0; 0, -10] DstBlock "Diode" DstPort 1 } Branch { Points [0, -85] DstBlock "Modulated signal" DstPort 1 } } Line { SrcBlock "Slider\nGain" SrcPort 1 Points [5, 0] Branch { Points [10, 0; 0, -60] DstBlock "Plot k m(t)" DstPort 1 } Branch { DstBlock "Sum" DstPort 1 } } Line { SrcBlock "Sum" SrcPort 1 Points [15, 0; 0, 50] DstBlock "Product" DstPort 1 } Line { SrcBlock "Carrier" SrcPort 1 Points [35, 0] DstBlock "Product" DstPort 2 } Line { SrcBlock "Constant" SrcPort 1 Points [125, 0] DstBlock "Sum" DstPort 2 } Line { SrcBlock "Message m(t)" SrcPort 1 DstBlock "Slider\nGain" DstPort 1 } } }