精华内容
下载资源
问答
  • 本文给大家分享了一个晶体符号及等效RLC电路
  • SIMULINK rlc电路仿真

    2021-03-31 21:47:32
    SIMULINK rlc电路仿真 电路模型 参数参考电路书,这是二阶电路的其中一种情况 仿真结果 实在太懒了

    电路模型
    在这里插入图片描述
    参数参考电路书,这是二阶电路的其中一种情况
    仿真结果
    在这里插入图片描述
    实在太懒了

    展开全文
  • RLC电路暂态特性研究实验原理RLC电路的暂态过程就是当电源接通或断开的瞬间(通常只有几个毫秒 甚至几个微秒),电路中的电流或电压非稳定的变化过程,即形成电 路充电或放电的瞬间变化过程。
  • MATLAB求解一阶RC电路和二阶RLC电路理论知识:交互界面介绍一阶RC全相应Multisim仿真:仿真结果为:二阶RLC电路Multisim仿真:仿真结果为:实现代码: 理论知识: 一阶RC电路全相应:根据节点电压法求出戴维宁等效...

    理论知识:

    一阶RC电路全相应:根据节点电压法求出戴维宁等效电路,列写微分方程求得Uc与t之间的关系,并绘图。
    二阶RLC电路: 根据节点电压法求出戴维宁等效电路,列写微分方程求得Uc,UL和t之间的关系,并绘图。

    交互界面介绍

    一阶RC全相应

    Multisim仿真:

    我们先用仿真软件Multisim绘制出待测电路图以及Uc-t曲线:
    左边是电路图,右边是仿真得出的曲线
    易得 t = 5s 时,Uc = 6.541V

    仿真结果为:

    在这里插入图片描述
    易得 t = 5s 时,Uc = 6.541V

    二阶RLC电路

    Multisim仿真:

    在这里插入图片描述
    易得 t = 5s 时,Uc = 8.707VUL = 0.3712V

    仿真结果为:

    在这里插入图片描述
    易得 t = 5s 时,Uc = 9.078VUL = 0.3711V

    实现代码:

    classdef dianlu2 < matlab.apps.AppBase
    
        % Properties that correspond to app components
        properties (Access = public)
            UIFigure           matlab.ui.Figure
            TabGroup           matlab.ui.container.TabGroup
            Tab                matlab.ui.container.Tab
            Label              matlab.ui.control.Label
            EditField          matlab.ui.control.NumericEditField
            EditField_2Label   matlab.ui.control.Label
            EditField_2        matlab.ui.control.NumericEditField
            Label_2            matlab.ui.control.Label
            EditField_3        matlab.ui.control.NumericEditField
            CaculateButton     matlab.ui.control.StateButton
            UIAxes             matlab.ui.control.UIAxes
            Label_3            matlab.ui.control.Label
            EditField_4        matlab.ui.control.NumericEditField
            Label_4            matlab.ui.control.Label
            EditField_5        matlab.ui.control.NumericEditField
            Label_5            matlab.ui.control.Label
            EditField_6        matlab.ui.control.NumericEditField
            Label_6            matlab.ui.control.Label
            EditField_7        matlab.ui.control.NumericEditField
            Tab_2              matlab.ui.container.Tab
            CaculateButton_2   matlab.ui.control.StateButton
            UIAxes_2           matlab.ui.control.UIAxes
            EditField_8Label   matlab.ui.control.Label
            EditField_8        matlab.ui.control.NumericEditField
            Label_7            matlab.ui.control.Label
            EditField_9        matlab.ui.control.NumericEditField
            EditField_10Label  matlab.ui.control.Label
            EditField_10       matlab.ui.control.NumericEditField
            EditField_11Label  matlab.ui.control.Label
            EditField_11       matlab.ui.control.NumericEditField
            EditField_12Label  matlab.ui.control.Label
            EditField_12       matlab.ui.control.NumericEditField
            EditField_13Label  matlab.ui.control.Label
            EditField_13       matlab.ui.control.NumericEditField
            Label_8            matlab.ui.control.Label
            EditField_14       matlab.ui.control.NumericEditField
            RLCTab             matlab.ui.container.Tab
            CaculateButton_3   matlab.ui.control.StateButton
            UIAxes_3           matlab.ui.control.UIAxes
            EditField_15Label  matlab.ui.control.Label
            EditField_15       matlab.ui.control.NumericEditField
            EditField_16Label  matlab.ui.control.Label
            EditField_16       matlab.ui.control.NumericEditField
            Label_12           matlab.ui.control.Label
            EditField_17       matlab.ui.control.NumericEditField
            EditField_18Label  matlab.ui.control.Label
            EditField_18       matlab.ui.control.NumericEditField
            Label_9            matlab.ui.control.Label
            EditField_19       matlab.ui.control.NumericEditField
            Label_10           matlab.ui.control.Label
            EditField_20       matlab.ui.control.NumericEditField
            Label_11           matlab.ui.control.Label
            EditField_21       matlab.ui.control.NumericEditField
            Label_13           matlab.ui.control.Label
            EditField_22       matlab.ui.control.NumericEditField
            EditField_23Label  matlab.ui.control.Label
            EditField_23       matlab.ui.control.NumericEditField
            GLCTab             matlab.ui.container.Tab
            CaculateButton_4   matlab.ui.control.StateButton
            UIAxes_4           matlab.ui.control.UIAxes
            EditField_24Label  matlab.ui.control.Label
            EditField_24       matlab.ui.control.NumericEditField
            EditField_25Label  matlab.ui.control.Label
            EditField_25       matlab.ui.control.NumericEditField
            EditField_26Label  matlab.ui.control.Label
            EditField_26       matlab.ui.control.NumericEditField
            Label_14           matlab.ui.control.Label
            EditField_27       matlab.ui.control.NumericEditField
            EditField_28Label  matlab.ui.control.Label
            EditField_28       matlab.ui.control.NumericEditField
            Label_15           matlab.ui.control.Label
            EditField_29       matlab.ui.control.NumericEditField
            Label_16           matlab.ui.control.Label
            EditField_30       matlab.ui.control.NumericEditField
            EditField_31Label  matlab.ui.control.Label
            EditField_31       matlab.ui.control.NumericEditField
            EditField_32Label  matlab.ui.control.Label
            EditField_32       matlab.ui.control.NumericEditField
        end
    
        % Callbacks that handle component events
        methods (Access = private)
    
            % Value changed function: CaculateButton
            function CaculateButtonValueChanged(app, event)
              
                x=(0:0.1:100);
                R=app.EditField.Value;
                C=app.EditField_2.Value;
                U0=app.EditField_3.Value;
                T=R*C;
                U1=app.EditField_4.Value;
                app.EditField_5.Value=T;
                time=app.EditField_6.Value;
                app.EditField_7.Value=U1+(U0-U1)*exp(-time/T);
                y=U1+(U0-U1)*exp(-x/T);
                plot(app.UIAxes,x,y);
            end
    
            % Value changed function: CaculateButton_2
            function CaculateButton_2ValueChanged(app, event)
                
                x=(0:0.1:100);
                R=app.EditField_8.Value;
                L=app.EditField_9.Value;
                I0=app.EditField_10.Value;
                T=L/R;
                U1=app.EditField_11.Value;
                app.EditField_12.Value=T;
                time=app.EditField_13.Value;
                %app.EditField_14.Value=abs(U1-(U1+(U0-U1)*exp(-time/T))*R);
                %y=U1+(U0-U1)*exp(-x/T);
                syms t
                i = dsolve('L*Di + i*R = U1,i(0) = I0','t');
                ul1=zeros(1,1001);
                ul= L*diff(i,t);
                h = 1;
                for t=0:0.1:100
                    ul1(h)=eval(ul);
                    h=h+1;
                end
                t = time;
                app.EditField_14.Value=abs(eval(ul));
                plot(app.UIAxes_2,x,ul1);
                
    
            end
    
            % Value changed function: CaculateButton_3
            function CaculateButton_3ValueChanged(app, event)
               
                r=app.EditField_15.Value;
                c=app.EditField_16.Value;
                l=app.EditField_17.Value;
                us=app.EditField_18.Value;
                time=app.EditField_19.Value;
                u0=app.EditField_22.Value;
                i0=app.EditField_23.Value;
                syms uc t 
                uc = dsolve('u+r*c*Du+l*c*D2u=us','u(0) =u0','Du(0) = i0/c','t');
                i = c*diff(uc,t);
                ul= l*diff(i,t);
                uc1=zeros(1,1001);
                ul1=zeros(1,1001);
                i1=zeros(1,1001);
                h=1;
                for t=0:0.1:100
                    uc1(h)=eval(uc);
                    ul1(h)=eval(ul);
                    i1(h)=eval(i);
                    h=h+1;
                end
                t=0:0.1:100;
                plot(app.UIAxes_3,t,uc1,'r-',t,ul1,'b',t,i1,'g-.');
                
                t=app.EditField_19.Value;
                app.EditField_20.Value=eval(uc);
                app.EditField_21.Value=eval(ul);
            end
    
            % Value changed function: CaculateButton_4
            function CaculateButton_4ValueChanged(app, event)
    
                r=app.EditField_24.Value;
                c=app.EditField_25.Value;
                l=app.EditField_26.Value;
                is=app.EditField_27.Value;
                time=app.EditField_28.Value;
                u0=app.EditField_31.Value;
                i0=app.EditField_32.Value;
                g=1/r;
                syms il t
                il = dsolve('i + l*c*D2i + Di*l*g = is','i(0) = i0,Di(0) = u0/l','t');
                u= l*diff(il,t);
                ic= c*diff(u,t);
                il1=zeros(1,1001);
                u1=zeros(1,1001);
                ic1=zeros(1,1001);
                h=1;
                for t=0:0.1:100
                    il1(h)=eval(il);
                    u1(h)=eval(u);
                    ic1(h)=eval(ic);
                    h=h+1;
                end
                t=0:0.1:100;
                plot(app.UIAxes_4,t,il1,'r-',t,ic1,'b',t,u1,'g-.');
                
                t=time;
                app.EditField_29.Value=eval(il);
                app.EditField_30.Value=eval(ic);
            end
        end
    
        % Component initialization
        methods (Access = private)
    
            % Create UIFigure and components
            function createComponents(app)
    
                % Create UIFigure and hide until all components are created
                app.UIFigure = uifigure('Visible', 'off');
                app.UIFigure.Position = [100 100 698 579];
                app.UIFigure.Name = 'MATLAB App';
    
                % Create TabGroup
                app.TabGroup = uitabgroup(app.UIFigure);
                app.TabGroup.Position = [1 4 700 576];
    
                % Create Tab
                app.Tab = uitab(app.TabGroup);
                app.Tab.Title = '电容';
    
                % Create Label
                app.Label = uilabel(app.Tab);
                app.Label.HorizontalAlignment = 'right';
                app.Label.Position = [65 53 37 22];
                app.Label.Text = '电阻';
    
                % Create EditField
                app.EditField = uieditfield(app.Tab, 'numeric');
                app.EditField.Position = [34 87 100 22];
    
                % Create EditField_2Label
                app.EditField_2Label = uilabel(app.Tab);
                app.EditField_2Label.HorizontalAlignment = 'right';
                app.EditField_2Label.Position = [168 53 29 22];
                app.EditField_2Label.Text = '电容';
    
                % Create EditField_2
                app.EditField_2 = uieditfield(app.Tab, 'numeric');
                app.EditField_2.Position = [133 87 100 22];
    
                % Create Label_2
                app.Label_2 = uilabel(app.Tab);
                app.Label_2.HorizontalAlignment = 'right';
                app.Label_2.Position = [261 53 41 22];
                app.Label_2.Text = '初始值';
    
                % Create EditField_3
                app.EditField_3 = uieditfield(app.Tab, 'numeric');
                app.EditField_3.Position = [232 87 100 22];
    
                % Create CaculateButton
                app.CaculateButton = uibutton(app.Tab, 'state');
                app.CaculateButton.ValueChangedFcn = createCallbackFcn(app, @CaculateButtonValueChanged, true);
                app.CaculateButton.Text = 'Caculate';
                app.CaculateButton.Position = [254 10 100 22];
    
                % Create UIAxes
                app.UIAxes = uiaxes(app.Tab);
                title(app.UIAxes, '电容电压')
                xlabel(app.UIAxes, '时间/s')
                ylabel(app.UIAxes, '电压/V')
                app.UIAxes.TitleFontWeight = 'bold';
                app.UIAxes.Position = [34 160 628 379];
    
                % Create Label_3
                app.Label_3 = uilabel(app.Tab);
                app.Label_3.HorizontalAlignment = 'right';
                app.Label_3.Position = [360 53 41 22];
                app.Label_3.Text = '电压源';
    
                % Create EditField_4
                app.EditField_4 = uieditfield(app.Tab, 'numeric');
                app.EditField_4.Position = [331 87 100 22];
    
                % Create Label_4
                app.Label_4 = uilabel(app.Tab);
                app.Label_4.HorizontalAlignment = 'right';
                app.Label_4.Position = [482 120 53 22];
                app.Label_4.Text = '时间常数';
    
                % Create EditField_5
                app.EditField_5 = uieditfield(app.Tab, 'numeric');
                app.EditField_5.Position = [550 120 100 22];
    
                % Create Label_5
                app.Label_5 = uilabel(app.Tab);
                app.Label_5.HorizontalAlignment = 'right';
                app.Label_5.Position = [506 74 29 22];
                app.Label_5.Text = '时间';
    
                % Create EditField_6
                app.EditField_6 = uieditfield(app.Tab, 'numeric');
                app.EditField_6.Position = [550 74 100 22];
    
                % Create Label_6
                app.Label_6 = uilabel(app.Tab);
                app.Label_6.HorizontalAlignment = 'right';
                app.Label_6.Position = [494 32 41 22];
                app.Label_6.Text = '电压值';
    
                % Create EditField_7
                app.EditField_7 = uieditfield(app.Tab, 'numeric');
                app.EditField_7.Position = [550 32 100 22];
    
                % Create Tab_2
                app.Tab_2 = uitab(app.TabGroup);
                app.Tab_2.Title = '电感';
    
                % Create CaculateButton_2
                app.CaculateButton_2 = uibutton(app.Tab_2, 'state');
                app.CaculateButton_2.ValueChangedFcn = createCallbackFcn(app, @CaculateButton_2ValueChanged, true);
                app.CaculateButton_2.Text = 'Caculate';
                app.CaculateButton_2.Position = [254 10 100 22];
    
                % Create UIAxes_2
                app.UIAxes_2 = uiaxes(app.Tab_2);
                title(app.UIAxes_2, '电感电压')
                xlabel(app.UIAxes_2, '时间/s')
                ylabel(app.UIAxes_2, '电压/V')
                app.UIAxes_2.TitleFontWeight = 'bold';
                app.UIAxes_2.Position = [34 160 628 379];
    
                % Create EditField_8Label
                app.EditField_8Label = uilabel(app.Tab_2);
                app.EditField_8Label.HorizontalAlignment = 'right';
                app.EditField_8Label.Position = [65 53 37 22];
                app.EditField_8Label.Text = '电阻';
    
                % Create EditField_8
                app.EditField_8 = uieditfield(app.Tab_2, 'numeric');
                app.EditField_8.Position = [34 87 100 22];
    
                % Create Label_7
                app.Label_7 = uilabel(app.Tab_2);
                app.Label_7.HorizontalAlignment = 'right';
                app.Label_7.Position = [168 53 29 22];
                app.Label_7.Text = '电感';
    
                % Create EditField_9
                app.EditField_9 = uieditfield(app.Tab_2, 'numeric');
                app.EditField_9.Position = [133 87 100 22];
    
                % Create EditField_10Label
                app.EditField_10Label = uilabel(app.Tab_2);
                app.EditField_10Label.HorizontalAlignment = 'right';
                app.EditField_10Label.Position = [261 53 41 22];
                app.EditField_10Label.Text = '初始值';
    
                % Create EditField_10
                app.EditField_10 = uieditfield(app.Tab_2, 'numeric');
                app.EditField_10.Position = [232 87 100 22];
    
                % Create EditField_11Label
                app.EditField_11Label = uilabel(app.Tab_2);
                app.EditField_11Label.HorizontalAlignment = 'right';
                app.EditField_11Label.Position = [360 53 41 22];
                app.EditField_11Label.Text = '电压源';
    
                % Create EditField_11
                app.EditField_11 = uieditfield(app.Tab_2, 'numeric');
                app.EditField_11.Position = [331 87 100 22];
    
                % Create EditField_12Label
                app.EditField_12Label = uilabel(app.Tab_2);
                app.EditField_12Label.HorizontalAlignment = 'right';
                app.EditField_12Label.Position = [482 120 53 22];
                app.EditField_12Label.Text = '时间常数';
    
                % Create EditField_12
                app.EditField_12 = uieditfield(app.Tab_2, 'numeric');
                app.EditField_12.Position = [550 120 100 22];
    
                % Create EditField_13Label
                app.EditField_13Label = uilabel(app.Tab_2);
                app.EditField_13Label.HorizontalAlignment = 'right';
                app.EditField_13Label.Position = [506 74 29 22];
                app.EditField_13Label.Text = '时间';
    
                % Create EditField_13
                app.EditField_13 = uieditfield(app.Tab_2, 'numeric');
                app.EditField_13.Position = [550 74 100 22];
    
                % Create Label_8
                app.Label_8 = uilabel(app.Tab_2);
                app.Label_8.HorizontalAlignment = 'right';
                app.Label_8.Position = [494 32 41 22];
                app.Label_8.Text = '电压值';
    
                % Create EditField_14
                app.EditField_14 = uieditfield(app.Tab_2, 'numeric');
                app.EditField_14.Position = [550 32 100 22];
    
                % Create RLCTab
                app.RLCTab = uitab(app.TabGroup);
                app.RLCTab.Title = '二阶RLC';
    
                % Create CaculateButton_3
                app.CaculateButton_3 = uibutton(app.RLCTab, 'state');
                app.CaculateButton_3.ValueChangedFcn = createCallbackFcn(app, @CaculateButton_3ValueChanged, true);
                app.CaculateButton_3.Text = 'Caculate';
                app.CaculateButton_3.Position = [254 10 100 22];
    
                % Create UIAxes_3
                app.UIAxes_3 = uiaxes(app.RLCTab);
                title(app.UIAxes_3, '')
                xlabel(app.UIAxes_3, '时间/s')
                ylabel(app.UIAxes_3, '电压/V')
                app.UIAxes_3.TitleFontWeight = 'bold';
                app.UIAxes_3.Position = [34 160 628 379];
    
                % Create EditField_15Label
                app.EditField_15Label = uilabel(app.RLCTab);
                app.EditField_15Label.HorizontalAlignment = 'right';
                app.EditField_15Label.Position = [65 53 37 22];
                app.EditField_15Label.Text = '电阻';
    
                % Create EditField_15
                app.EditField_15 = uieditfield(app.RLCTab, 'numeric');
                app.EditField_15.Position = [34 87 100 22];
    
                % Create EditField_16Label
                app.EditField_16Label = uilabel(app.RLCTab);
                app.EditField_16Label.HorizontalAlignment = 'right';
                app.EditField_16Label.Position = [168 53 29 22];
                app.EditField_16Label.Text = '电容';
    
                % Create EditField_16
                app.EditField_16 = uieditfield(app.RLCTab, 'numeric');
                app.EditField_16.Position = [133 87 100 22];
    
                % Create Label_12
                app.Label_12 = uilabel(app.RLCTab);
                app.Label_12.HorizontalAlignment = 'right';
                app.Label_12.Position = [273 53 29 22];
                app.Label_12.Text = '电感';
    
                % Create EditField_17
                app.EditField_17 = uieditfield(app.RLCTab, 'numeric');
                app.EditField_17.Position = [232 87 100 22];
    
                % Create EditField_18Label
                app.EditField_18Label = uilabel(app.RLCTab);
                app.EditField_18Label.HorizontalAlignment = 'right';
                app.EditField_18Label.Position = [360 53 41 22];
                app.EditField_18Label.Text = '电压源';
    
                % Create EditField_18
                app.EditField_18 = uieditfield(app.RLCTab, 'numeric');
                app.EditField_18.Position = [331 87 100 22];
    
                % Create Label_9
                app.Label_9 = uilabel(app.RLCTab);
                app.Label_9.HorizontalAlignment = 'right';
                app.Label_9.Position = [506 120 29 22];
                app.Label_9.Text = '时间';
    
                % Create EditField_19
                app.EditField_19 = uieditfield(app.RLCTab, 'numeric');
                app.EditField_19.Position = [550 120 100 22];
    
                % Create Label_10
                app.Label_10 = uilabel(app.RLCTab);
                app.Label_10.HorizontalAlignment = 'right';
                app.Label_10.Position = [482 74 53 22];
                app.Label_10.Text = '电容电压';
    
                % Create EditField_20
                app.EditField_20 = uieditfield(app.RLCTab, 'numeric');
                app.EditField_20.Position = [550 74 100 22];
    
                % Create Label_11
                app.Label_11 = uilabel(app.RLCTab);
                app.Label_11.HorizontalAlignment = 'right';
                app.Label_11.Position = [482 32 53 22];
                app.Label_11.Text = '电感电压';
    
                % Create EditField_21
                app.EditField_21 = uieditfield(app.RLCTab, 'numeric');
                app.EditField_21.Position = [550 32 100 22];
    
                % Create Label_13
                app.Label_13 = uilabel(app.RLCTab);
                app.Label_13.HorizontalAlignment = 'right';
                app.Label_13.Position = [138 149 89 22];
                app.Label_13.Text = '电容电压初始值';
    
                % Create EditField_22
                app.EditField_22 = uieditfield(app.RLCTab, 'numeric');
                app.EditField_22.Position = [133 120 100 22];
    
                % Create EditField_23Label
                app.EditField_23Label = uilabel(app.RLCTab);
                app.EditField_23Label.HorizontalAlignment = 'right';
                app.EditField_23Label.Position = [237 149 89 22];
                app.EditField_23Label.Text = '电感电流初始值';
    
                % Create EditField_23
                app.EditField_23 = uieditfield(app.RLCTab, 'numeric');
                app.EditField_23.Position = [232 120 100 22];
    
                % Create GLCTab
                app.GLCTab = uitab(app.TabGroup);
                app.GLCTab.Title = '二阶GLC';
    
                % Create CaculateButton_4
                app.CaculateButton_4 = uibutton(app.GLCTab, 'state');
                app.CaculateButton_4.ValueChangedFcn = createCallbackFcn(app, @CaculateButton_4ValueChanged, true);
                app.CaculateButton_4.Text = 'Caculate';
                app.CaculateButton_4.Position = [254 10 100 22];
    
                % Create UIAxes_4
                app.UIAxes_4 = uiaxes(app.GLCTab);
                title(app.UIAxes_4, '')
                xlabel(app.UIAxes_4, '时间/s')
                ylabel(app.UIAxes_4, '电流/I')
                app.UIAxes_4.TitleFontWeight = 'bold';
                app.UIAxes_4.Position = [34 160 628 379];
    
                % Create EditField_24Label
                app.EditField_24Label = uilabel(app.GLCTab);
                app.EditField_24Label.HorizontalAlignment = 'right';
                app.EditField_24Label.Position = [65 53 37 22];
                app.EditField_24Label.Text = '电阻';
    
                % Create EditField_24
                app.EditField_24 = uieditfield(app.GLCTab, 'numeric');
                app.EditField_24.Position = [34 87 100 22];
    
                % Create EditField_25Label
                app.EditField_25Label = uilabel(app.GLCTab);
                app.EditField_25Label.HorizontalAlignment = 'right';
                app.EditField_25Label.Position = [168 53 29 22];
                app.EditField_25Label.Text = '电容';
    
                % Create EditField_25
                app.EditField_25 = uieditfield(app.GLCTab, 'numeric');
                app.EditField_25.Position = [133 87 100 22];
    
                % Create EditField_26Label
                app.EditField_26Label = uilabel(app.GLCTab);
                app.EditField_26Label.HorizontalAlignment = 'right';
                app.EditField_26Label.Position = [273 53 29 22];
                app.EditField_26Label.Text = '电感';
    
                % Create EditField_26
                app.EditField_26 = uieditfield(app.GLCTab, 'numeric');
                app.EditField_26.Position = [232 87 100 22];
    
                % Create Label_14
                app.Label_14 = uilabel(app.GLCTab);
                app.Label_14.HorizontalAlignment = 'right';
                app.Label_14.Position = [360 53 41 22];
                app.Label_14.Text = '电流源';
    
                % Create EditField_27
                app.EditField_27 = uieditfield(app.GLCTab, 'numeric');
                app.EditField_27.Position = [331 87 100 22];
    
                % Create EditField_28Label
                app.EditField_28Label = uilabel(app.GLCTab);
                app.EditField_28Label.HorizontalAlignment = 'right';
                app.EditField_28Label.Position = [506 120 29 22];
                app.EditField_28Label.Text = '时间';
    
                % Create EditField_28
                app.EditField_28 = uieditfield(app.GLCTab, 'numeric');
                app.EditField_28.Position = [550 120 100 22];
    
                % Create Label_15
                app.Label_15 = uilabel(app.GLCTab);
                app.Label_15.HorizontalAlignment = 'right';
                app.Label_15.Position = [482 74 53 22];
                app.Label_15.Text = '电容电流';
    
                % Create EditField_29
                app.EditField_29 = uieditfield(app.GLCTab, 'numeric');
                app.EditField_29.Position = [550 74 100 22];
    
                % Create Label_16
                app.Label_16 = uilabel(app.GLCTab);
                app.Label_16.HorizontalAlignment = 'right';
                app.Label_16.Position = [482 32 53 22];
                app.Label_16.Text = '电感电流';
    
                % Create EditField_30
                app.EditField_30 = uieditfield(app.GLCTab, 'numeric');
                app.EditField_30.Position = [550 32 100 22];
    
                % Create EditField_31Label
                app.EditField_31Label = uilabel(app.GLCTab);
                app.EditField_31Label.HorizontalAlignment = 'right';
                app.EditField_31Label.Position = [138 149 89 22];
                app.EditField_31Label.Text = '电容电压初始值';
    
                % Create EditField_31
                app.EditField_31 = uieditfield(app.GLCTab, 'numeric');
                app.EditField_31.Position = [133 120 100 22];
    
                % Create EditField_32Label
                app.EditField_32Label = uilabel(app.GLCTab);
                app.EditField_32Label.HorizontalAlignment = 'right';
                app.EditField_32Label.Position = [237 149 89 22];
                app.EditField_32Label.Text = '电感电流初始值';
    
                % Create EditField_32
                app.EditField_32 = uieditfield(app.GLCTab, 'numeric');
                app.EditField_32.Position = [232 120 100 22];
    
                % Show the figure after all components are created
                app.UIFigure.Visible = 'on';
            end
        end
    
        % App creation and deletion
        methods (Access = public)
    
            % Construct app
            function app = dianlu2
    
                % Create UIFigure and components
                createComponents(app)
    
                % Register the app with App Designer
                registerApp(app, app.UIFigure)
    
                if nargout == 0
                    clear app
                end
            end
    
            % Code that executes before app deletion
            function delete(app)
    
                % Delete UIFigure when app is deleted
                delete(app.UIFigure)
            end
        end
    end
    
    展开全文
  • RLC电路matlab仿真m文件

    2014-06-14 15:18:41
    RLC电路的matlab仿真的M文件,用三种不同的方法仿真RLC电路,是一个系统仿真的简单实例
  • RLC电路特性分析程序

    2013-08-05 20:28:50
    一个简单的RLC电路特性分析程序,大家有兴趣看一下
  • 滤波器入门RLC电路BSF

    2019-12-30 11:46:49
    滤波器入门RLC电路BSF Abstract A filter for attenuating 10kHZ signal from 1kHZ signal is needed. We use RLC circuit as a band stop filter to achieve this and use oscilloscope and frequency analyzer to ...

    滤波器入门RLC电路BSF

    Abstract

    A filter for attenuating 10kHZ signal from 1kHZ signal is needed. We use RLC circuit as a band stop filter to achieve this and use oscilloscope and frequency analyzer to observe the result .We get -41.617dB gain and -40.2dB gain for 10kHZ signal in simulation and real circuit respectively.

    Introduction

    In this experiment ,we are asked to design a filter .The useful band width is 0HZ-1kHZ, but it is contaminated by an undesired 10kHZ harmonic (sinusoidal) signal. We need to design a filter that let pass through the useful signal without attenuating to it and attenuates the 10kHZ harmonic signal by at least 40dB(0.01).

    Methodology

    In order to successfully attenuates the 10kHZ harmonic signal and preserve useful signal ,we decide to use RLC series circuit as a BSF.

    在这里插入图片描述在这里插入图片描述
    We choose this circuit because it can significantly attenuates signal in a certain frequency width without attenuating other frequency signals.
    To get the ideal value for components in our circuit ,we first get formula of gain of our circuit through voltage divider rules in circuit. And we can kwon from this formula that the null frequency is w=2\pi f=\frac{1}{\sqrt{LC}}=20000π\approx63245.55 rad/s .And we choose R=5000Ω, L=50mH,C=5nF.

    在这里插入图片描述
    在这里插入图片描述
    Then we calculate the theoretical value in MATLAB and get that the gain of the unwanted 10kHZ as less than 0.01(0.0083) ,it means that the attenuation result is more than 40dB.
    After getting this result we decide to simulate the circuit in PSPice and also construct the circuit on breadboard to better prove our result.

    在这里插入图片描述
    (In this circuit ,we connect two sinusoid signal sources in series so that we can get a 1kHZ signal with 10kHZ signal as a contamination. The input of the circuit is between the signal source and R1, the output of circuit is between R1 and C1,the ground is obvious with its symbol on the circuit. XSCI is oscilloscope, and XBPI is frequency analyzer )

    在这里插入图片描述

    Results and Discussion

    In PSPice we get the simulation result as below:

    在这里插入图片描述
    (Orange line is the input signal and red line is the signal after attenuation).

    在这里插入图片描述

    在这里插入图片描述
    (This is the result of the frequency analyzer XBPI ,we can see that for signal near 1kHZ ,its gain is -0.111 dB which is small enough, and attenuation for 10kHZ signal is 41.617dB which satisfy the requirement successfully.)

    在这里插入图片描述

    And this is result of the circuit we construct on breadboard .Regretfully ,there is no frequency analyzer in lab, so we just can use the P-P value to roughly calculate the gain of the output wave. We get that gain of the 1kHZ signal is about-7dB ,and the gain of the 10kHZ signal is about -40.2dB.
    The circuit on bread board obviously work less efficiently than that in simulation. Through discussion ,we think this is mainly because the resistance of the inductance are not negligible in real circuit.

    Conclusions

    Our problem is to construct a filter circuit to attenuate 10kHZ signal from 1kHZ signal .To handle this we use a series RLC circuit as a band stop filter . To compare the difference of the input signal and output signal ,we use oscilloscope with two input to illustrate the waveform. And to know the effect of attenuation we use a frequency analyzer to analyze the output signal ,and get a proposed result in simulation .However ,in circuit constructed on bread board the error is much bigger and this may because the resistance in inductance or error in the value of the components.

    展开全文
  • OpenModelica仿真RLC电路

    2020-04-08 10:43:06
    OpenModelica仿真RLC电路 安装 官网下载,多个平台(LINUX、WIN、MAC)均有,本人的安装环境是WIN 64. 本来一般软件在win下安装都是没什么问题的,但是我在安装OpenModelica的时候,...
    OpenModelica仿真RLC电路

    安装

    官网下载,多个平台(LINUX、WIN、MAC)均有,本人的安装环境是WIN 64.

    本来一般软件在win下安装都是没什么问题的,但是我在安装OpenModelica的时候,第一次,先是下载了最新版本,(没有选择以管理员身份运行)自定义安装目录,安装快完成的时候提示安装失败。第二次,以为最新版不稳定,重新下载了OpenModelica-v1.11.0-64bit.exe这个版本,同样没有以管理员身份运行,选择了自定义安装目录,依然失败告终;第三次,用OpenModelica-v1.11.0-64bit.exe这个版本选择了管理员身份运行,默认的安装目录(C盘),最后安装成功了,问题不知道出在了哪里,因为有两个影响因素,本人就不折腾了,有兴趣的同学可以分别试一下。

    程序运行

    安装完之后,在所有程序那里会找到几个程序,打开OpenModelica Connection Editor,最后如下图,注意红色方框的地方,左边是各种库文件,默认的只有上面几个,下面几个要自己添加进去,右下角是界面切换的按钮,编译之后会出现绘图界面,返回到模型界面需要那里转换

    添加库

    OpenModelica安装之后会有很多库了,位于"C:\OpenModelica1.11.0-64bit\lib\omlibrary",

    具体安装如下图

    建立模型

    下面仿真两种RLC电路,新建一个Model,如图,

    (1)代码1

    model rlc_demo "A resistor-inductor-capacitor circuit model"
    type Voltage=Real(unit="V");
    type Current=Real(unit="A");
    type Resistance=Real(unit="Ohm");
    type Capacitance=Real(unit="F");
    type Inductance=Real(unit="H");
    parameter Voltage Vb=24 "Battery voltage"; // 电源电压24V
    parameter Inductance L = 1;
    parameter Resistance R = 100;
    parameter Capacitance C = 1e-3;
    Voltage V_R;
    Voltage V_L;
    Voltage V_C;
    Current i;
    // RLC 二阶电路
    equation
    C*der(V_C) = i; // 电容通过的电流
    V_R = i * R;
    V_L = L * der(i); // 电感上的电压
    Vb = V_R + V_C + V_L;end rlc_demo;

    (2)代码2

    model RLC1 "A resistor-inductor-capacitor circuit model"
    type Voltage=Real(unit="V");
    type Current=Real(unit="A");
    type Resistance=Real(unit="Ohm");
    type Capacitance=Real(unit="F");
    type Inductance=Real(unit="H");
    parameter Voltage Vb=24 "Battery voltage";
    parameter Inductance L = 1;
    parameter Resistance R = 100;
    parameter Capacitance C = 1e-3;
    Voltage V;
    Current i_L;
    Current i_R;
    Current i_C;
    equation
    V = i_R*R;
    C*der(V) = i_C; // 流进电容的电流公式
    L*der(i_L) = (Vb-V); // 电感上的电压
    i_L=i_R+i_C; // 基尔霍夫电流定律
    end RLC1;

    模型中的变量名和方程数要保持一致,不然会报错.

    der(V)是对时间的求导(derivative),这点和一般的求微分方程不同,der(var)都是变量var对时间的求导,由下面的绘图结果也可以知道横坐标为时间time,即der(x)看作是

    der(x)=>dxdt

    der(x)=>dxdt

    模型编译及绘图

    (1)编译

    点击仿真运行,运行后会出现一个界面显示编译状态

    (2)绘图

    1) RLC1

    2) RLC2

    展开全文
  • 磁滞回线与RLC电路

    2014-05-27 19:09:15
    磁滞回线与RLC电路物理实验PPT 铁磁材料的磁化曲线和磁滞回线是该材料的重要特性,也是设计电磁机械/仪表的依据之一。 通过实验研究这些性质不仅能掌握用示波器观察磁滞回线以及基本磁化曲线的测绘方法,而且能从...
  • RC、RLC电路的暂态过程
  • 在电路理论的学习中,二阶电路是比较重要的一节,尤其是阶跃响应对系统分析很用!RLC电路零输入响应---欠阻尼、过阻尼、临界阻尼、无阻尼情况
  • 这是大学物理RLC电路稳态特性研究实验的的数据处理的软件!很简洁实用的一个软件,不用复杂的公式,只要把测得的数据写进去,然后点击计算,一切家ok!可啊!!
  • 哟偶那个matlab分析的 RLC电路
  • 文档研究了RLC电路中二维二阶微分方程组的求解问题
  • 1 应用Multisim软件对RLC电路的频率响应进行分析; 2 讨论R、L、C的值变化对频率响应的影响。
  • PLECS软件学习使用(一)简单的RLC电路搭建 1相关操作总结: 旋转:Ctrl+R 翻转:Ctrl+F 从连线中引出线:Ctrl+鼠标左键 设置元件参数:双击元件,进行设置,若要显示参数,则在参数后的方框打勾 单位:自己...
  • 谐振电路也称为调谐电路,由电感、电容以及电压或电流源组成。它是电子产品中最重要的电路之一。例如,许多形式的谐振电路可以随时从周围大量的信号中调谐到所需的无线电台或电视台。
  • 文章目录LC-resonant circuits并联带通滤波器串联带阻滤波器电容耦合LC震荡电路 LC-resonant circuits 电感和电容常以LC震荡电路的形式存在于射频电路中 LC震荡电路也被称为 LC tank,因为它可以像水箱存水一样存储...
  • (1) 研究交流信号在RC、RL和RLC串联电路中的相频和幅频特性 (2) 学习使用双踪示波器测量相位差 若输入信号含有不同频率成分,则高频成分将更多地降落在电阻上,而低频部分将更多地降落在电容上,从而可以...
  • RLC电路二阶状态轨迹

    2009-08-07 10:26:03
    状态方程: (i',v')=[-r/l -1/l [i [1/l 1/c 0 ]* v]+ 0] *v 分别用了ODE45算子求解和matlab控制工具箱(exp3ss.m)
  • 对于任意一个电路系统,我们基本上都能使用RLC和受控源进行等效,因此RLC系统的求解是任意一个系统求解的核心。 我们熟知,对于任意一个复杂的电路系统,基尔霍夫定律(Kirchhoff’s laws)总是成立的。选择使用...
  • RLC电路Q值测量研究

    2010-11-06 11:38:44
    介绍精确的电阻、电容、电感值的测量方法,并介绍电感的Q值的测量
  • C=1e-7;R=1050;tau=R*C;x1=0:0.00002:0.0005;x2=0.0005:0.00002:0.001;y1=0.8*(1-exp(-x1/tau));y2=0.8*(exp(-(x2-0.0005)/tau))-(0.8-0.8*(1-exp(-0.0005/tau))); x=[x1,x2];y=[y1,y2];plot(x,y)hold ona1=0:0.0000...
  • 将正弦交流电压加到电阻、电容和电感组成的电路中时,各元件上的电压及相位会随着变化,这称作电路的稳态特性:将一个阶跃电压加到 元件组成的电路中时,电路的状态会由一个平衡态转变到另一个平衡态,各元件上的...
  • 是个很好的软件,应该对广大电子设计爱好者有一定的帮助。

空空如也

空空如也

1 2 3 4 5 ... 18
收藏数 359
精华内容 143
关键字:

rlc电路