幅频特性曲线分析及使用WPF绘制

news2024/9/22 4:16:01

文章目录

  • 1、一阶惯性环节的幅频特性曲线分析及绘制
  • 2、二阶系统的幅频特性曲线分析及绘制
  • 3、一般的系统
  • 4、上位机代码实现
    • 4.1 一阶惯性系统
    • 4.2 二阶系统
  • 5、稳定裕度
    • 5.1 幅值裕度
    • 5.2 相角裕度
  • 参考

1、一阶惯性环节的幅频特性曲线分析及绘制

在这里插入图片描述
这里的a和b可以根据系统的不同修改,然后在0-50Hz内以1/10000的分辨率取点,可得对数幅频特性曲线(1/0.5s+1):
在这里插入图片描述
MATLAB脚本实现传递函数(1/0.5s+1)的伯德图绘制:

% 0.001 - 10^1.5  10000个点
w = logspace(-3,2,10000);
num = [0 1];
f = [0.5 1];
sys = tf(num,f);
P = bodeoptions;
% 横坐标为Hz
P.FreqUnits = 'Hz';
bode(sys,w,P)

在这里插入图片描述

2、二阶系统的幅频特性曲线分析及绘制

在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
MATLAB脚本实现传递函数(2/(0.01s+1)(0.2s+1)的伯德图绘制:

% 0.001 - 10^1.5  10000个点
w = logspace(-3,2,10000);
num = [0 2];
f1 = [0.01 1];
f2 = [0.2 1];
den = conv(f1,f2);
sys = tf(num,den);
P = bodeoptions;
% 横坐标为Hz
P.FreqUnits = 'Hz';
bode(sys,w,P)

在这里插入图片描述

3、一般的系统

在这里插入图片描述

4、上位机代码实现

源码及Oxyplot源码下载地址: WPF实现bode图demo源码

4.1 一阶惯性系统

<Page x:Class="WPF_Demo_V2.View.LogChartPage"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:WPF_Demo_V2.View"
      xmlns:oxyplot="http://oxyplot.org/wpf"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="LogChartPage">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5*"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <oxyplot:PlotView Model="{Binding MyPlotModelUp}"/>
        <oxyplot:PlotView Grid.Row="1"  Model="{Binding MyPlotModelDown}"/>
        <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Vertical">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.8*"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock Text="a:" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Column="1" Text="{Binding A}" Margin="2"></TextBox>
                <TextBlock Text="b:" Grid.Row="1" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding B}" Margin="2"></TextBox>
                <TextBlock Text="X max:" Grid.Row="2" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding X_max}" Margin="2"></TextBox>
                <TextBlock Text="factor:" Grid.Row="3" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding Factor}" Margin="2" ToolTip="X_max/factor 为最小分辨率"></TextBox>
                <TextBlock Text="Y1 min:" Grid.Row="4" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="4" Grid.Column="1" Text="{Binding Y1_min}" Margin="2"></TextBox>
                <TextBlock Text="Y1 max:" Grid.Row="5" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Y1_max}" Margin="2"></TextBox>
                <TextBlock Text="Y2 min:" Grid.Row="6" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="6" Grid.Column="1" Text="{Binding Y2_min}" Margin="2"></TextBox>
                <TextBlock Text="Y2 max:" Grid.Row="7" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="7" Grid.Column="1" Text="{Binding Y2_max}" Margin="2"></TextBox>
                <Button Grid.Row="8" Grid.ColumnSpan="2" Content="确定" Margin="20,2" Command="{Binding sureCommand}"/>
            </Grid>
            <Image Source="../Resource/Image/function.png"/>
        </StackPanel>
        
    </Grid>
</Page>

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using OxyPlot;
using OxyPlot.Axes;
using OxyPlot.Series;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WPF_Demo_V2.ViewModel
{
    partial class LogChartViewModel: ObservableObject
    {
        #region 全局变量
        //UInt32 LEN = 50;
        //UInt32 FACT = 10000;
        double[] Gain;
        double[] Phase;
        FunctionSeries upFunctionSeries=new FunctionSeries();
        FunctionSeries downFunctionSeries=new FunctionSeries();
        #endregion

        #region 构造函数
        public LogChartViewModel()
        {
            upFunctionSeries.Title = "Gain";
            downFunctionSeries.Title = "Phase";
        }
        #endregion

        #region 属性
        [ObservableProperty]
        public PlotModel _MyPlotModelUp;

        [ObservableProperty]
        public PlotModel _MyPlotModelDown;

        [ObservableProperty]
        public double _A = 0.5;

        [ObservableProperty]
        public double _B = 1;

        [ObservableProperty]
        public int _X_max = 50;

        [ObservableProperty]
        public int _Factor = 10000;

        [ObservableProperty]
        public double _Y1_max = 0;

        [ObservableProperty]
        public double _Y1_min = -50;

        [ObservableProperty]
        public double _Y2_max = 0;

        [ObservableProperty]
        public double _Y2_min = -90;
        #endregion

        #region 方法
        public PlotModel PlotModelInit(string xtitle,string ytitle,double ymin,double ymax)
        {
            var plotModel = new PlotModel();
            //plotModel.Title = "Log Paper";
            var logarithmicAxis1 = new LogarithmicAxis();
            logarithmicAxis1.MajorGridlineColor = OxyColor.FromArgb(40, 0, 0, 139);
            logarithmicAxis1.MajorGridlineStyle = LineStyle.Solid;
            logarithmicAxis1.Maximum = X_max;
            logarithmicAxis1.Minimum = 1/ (double)Factor;
            logarithmicAxis1.MinorGridlineColor = OxyColor.FromArgb(20, 0, 0, 139);
            logarithmicAxis1.MinorGridlineStyle = LineStyle.Solid;
            logarithmicAxis1.Position = AxisPosition.Bottom;
            if (!string.IsNullOrEmpty(xtitle)) logarithmicAxis1.Title = xtitle;
            plotModel.Axes.Add(logarithmicAxis1);
            var linearAxis1 = new LinearAxis();
            linearAxis1.MajorGridlineStyle = LineStyle.Solid;
            linearAxis1.MinorGridlineStyle = LineStyle.Dot;
            linearAxis1.Maximum = ymax;
            linearAxis1.Minimum = ymin;
            linearAxis1.Title = ytitle;
            plotModel.Axes.Add(linearAxis1);
            return plotModel;
        }

        [RelayCommand]
        private void sure()
        {
            if(upFunctionSeries.Points.Count>0) upFunctionSeries.Points.Clear();
            if (downFunctionSeries.Points.Count > 0)downFunctionSeries.Points.Clear();
            if (MyPlotModelUp != null) 
            {
                if (MyPlotModelUp.Series.Count > 0) MyPlotModelUp.Series.Clear();
            }
            if(MyPlotModelDown != null)
            {
                if (MyPlotModelDown.Series.Count > 0) MyPlotModelDown.Series.Clear();
            }
            
            MyPlotModelUp = PlotModelInit("", "Magnitude[dB]", Y1_min, Y1_max);
            MyPlotModelDown = PlotModelInit("Frequency[Hz]", "Phase[deg]", Y2_min, Y2_max);

            Gain = new double[X_max * Factor];
            Phase = new double[X_max * Factor];


            for (int i = 0; i < X_max * Factor; i++)
            {
                double temp_a = 2 * Math.PI * A * (i / (double)Factor);
                double temp_2 = Math.Pow(temp_a, 2) + Math.Pow(B, 2);
                double temp_sqrt = 1 / Math.Sqrt(temp_2);
                double temp = Math.Abs(temp_sqrt);
                Gain[i] = 20 * Math.Log10(temp);
                Phase[i] = -Math.Atan(temp_a / (double)B) / Math.PI * 180;

                upFunctionSeries.Points.Add(new DataPoint(i / (double)Factor, Gain[i]));
                downFunctionSeries.Points.Add(new DataPoint(i / (double)Factor, Phase[i]));
            }
            MyPlotModelUp.Series.Add(upFunctionSeries);
            MyPlotModelDown.Series.Add(downFunctionSeries);
            MyPlotModelUp.ResetAllAxes();
            MyPlotModelUp.InvalidatePlot(true);
            MyPlotModelDown.ResetAllAxes();
            MyPlotModelDown.InvalidatePlot(true);
        }
        #endregion
    }
}

4.2 二阶系统

<Page x:Class="WPF_Demo_V2.View.Log3ChartPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
            xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
                xmlns:local="clr-namespace:WPF_Demo_V2.View"
                    xmlns:oxyplot="http://oxyplot.org/wpf"
                        mc:Ignorable="d" 
                            d:DesignHeight="450" d:DesignWidth="800"
                                Title="Log3ChartPage">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5*"/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <oxyplot:PlotView Model="{Binding MyPlotModelUp}"/>
        <oxyplot:PlotView Grid.Row="1"  Model="{Binding MyPlotModelDown}"/>
        <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Vertical">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="0.8*"/>
                    <ColumnDefinition/>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                    <RowDefinition/>
                </Grid.RowDefinitions>
                <TextBlock Text="a:" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Column="1" Text="{Binding A}" Margin="2"></TextBox>
                <TextBlock Text="b:" Grid.Row="1" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="1" Grid.Column="1" Text="{Binding B}" Margin="2"></TextBox>
                <TextBlock Text="c:" Grid.Row="2" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="2" Grid.Column="1" Text="{Binding C}" Margin="2"></TextBox>
                
            <TextBlock Text="X max:" Grid.Row="3" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="3" Grid.Column="1" Text="{Binding X_max}" Margin="2"></TextBox>
                <TextBlock Text="factor:" Grid.Row="4" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="4" Grid.Column="1" Text="{Binding Factor}" Margin="2" ToolTip="X_max/factor 为最小分辨率"></TextBox>
                <TextBlock Text="Y1 min:" Grid.Row="5" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="5" Grid.Column="1" Text="{Binding Y1_min}" Margin="2"></TextBox>
                <TextBlock Text="Y1 max:" Grid.Row="6" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="6" Grid.Column="1" Text="{Binding Y1_max}" Margin="2"></TextBox>
                <TextBlock Text="Y2 min:" Grid.Row="7" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="7" Grid.Column="1" Text="{Binding Y2_min}" Margin="2"></TextBox>
                <TextBlock Text="Y2 max:" Grid.Row="8" Foreground="White" HorizontalAlignment="Right"/>
                <TextBox Grid.Row="8" Grid.Column="1" Text="{Binding Y2_max}" Margin="2"></TextBox>
                <Button Grid.Row="9" Grid.ColumnSpan="2" Content="确定" Margin="20,2" Command="{Binding sureCommand}"/>
            </Grid>
            <Image Source="../Resource/Image/function.png"/>
        </StackPanel>

    </Grid>
</Page>

using CommunityToolkit.Mvvm.ComponentModel;
using CommunityToolkit.Mvvm.Input;
using OxyPlot.Axes;
using OxyPlot.Series;
using OxyPlot;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace WPF_Demo_V2.ViewModel
{
    partial class Log3ChartViewModel: ObservableObject
    {
        #region 全局变量
            //UInt32 LEN = 50;
            //UInt32 FACT = 10000;
            double[] Gain;
        double[] Phase;
        FunctionSeries upFunctionSeries = new FunctionSeries();
        FunctionSeries downFunctionSeries = new FunctionSeries();
        #endregion

            #region 构造函数
            public Log3ChartViewModel()
        {
            upFunctionSeries.Title = "Gain";
            downFunctionSeries.Title = "Phase";
        }
        #endregion

            #region 属性
            [ObservableProperty]
            public PlotModel _MyPlotModelUp;

        [ObservableProperty]
        public PlotModel _MyPlotModelDown;

        [ObservableProperty]
        public double _A = 0.5;

        [ObservableProperty]
        public double _B = 1;

        [ObservableProperty]
        public double _C = 1;

        [ObservableProperty]
        public int _X_max = 50;

        [ObservableProperty]
        public int _Factor = 10000;

        [ObservableProperty]
        public double _Y1_max = 0;

        [ObservableProperty]
        public double _Y1_min = -100;

        [ObservableProperty]
        public double _Y2_max = 100;

        [ObservableProperty]
        public double _Y2_min = -100;
        #endregion

            #region 方法
            public PlotModel PlotModelInit(string xtitle, string ytitle, double ymin, double ymax)
        {
            var plotModel = new PlotModel();
            //plotModel.Title = "Log Paper";
            var logarithmicAxis1 = new LogarithmicAxis();
            logarithmicAxis1.MajorGridlineColor = OxyColor.FromArgb(40, 0, 0, 139);
            logarithmicAxis1.MajorGridlineStyle = LineStyle.Solid;
            logarithmicAxis1.Maximum = X_max;
            logarithmicAxis1.Minimum = 1 / (double)Factor;
            logarithmicAxis1.MinorGridlineColor = OxyColor.FromArgb(20, 0, 0, 139);
            logarithmicAxis1.MinorGridlineStyle = LineStyle.Solid;
            logarithmicAxis1.Position = AxisPosition.Bottom;
            if (!string.IsNullOrEmpty(xtitle)) logarithmicAxis1.Title = xtitle;
            plotModel.Axes.Add(logarithmicAxis1);
            var linearAxis1 = new LinearAxis();
            linearAxis1.MajorGridlineStyle = LineStyle.Solid;
            linearAxis1.MinorGridlineStyle = LineStyle.Dot;
            linearAxis1.Maximum = ymax;
            linearAxis1.Minimum = ymin;
            linearAxis1.Title = ytitle;
            plotModel.Axes.Add(linearAxis1);
            //var logarithmicAxis2 = new LogarithmicAxis();
            //logarithmicAxis2.MajorGridlineColor = OxyColor.FromArgb(40, 0, 0, 139);
            //logarithmicAxis2.MajorGridlineStyle = LineStyle.Solid;
            //logarithmicAxis2.Maximum = 180;
            //logarithmicAxis2.Minimum = -180;
            //logarithmicAxis2.MinorGridlineColor = OxyColor.FromArgb(20, 0, 0, 139);
            //logarithmicAxis2.MinorGridlineStyle = LineStyle.Solid;
            //logarithmicAxis2.Title = "Y";
            //plotModel.Axes.Add(logarithmicAxis2);
            return plotModel;
        }

        [RelayCommand]
        private void sure()
        {
            if (upFunctionSeries.Points.Count > 0) upFunctionSeries.Points.Clear();
            if (downFunctionSeries.Points.Count > 0) downFunctionSeries.Points.Clear();
            if (MyPlotModelUp != null)
            {
                if (MyPlotModelUp.Series.Count > 0) MyPlotModelUp.Series.Clear();
            }
            if (MyPlotModelDown != null)
            {
                if (MyPlotModelDown.Series.Count > 0) MyPlotModelDown.Series.Clear();
            }

            MyPlotModelUp = PlotModelInit("", "Magnitude[dB]", Y1_min, Y1_max);
            MyPlotModelDown = PlotModelInit("Frequency[Hz]", "Phase[deg]", Y2_min, Y2_max);

            Gain = new double[X_max * Factor];
            Phase = new double[X_max * Factor];

            double previousPhase = 0;

            for (int i = 0; i < X_max * Factor; i++)
            {
                double w = 2 * Math.PI * (i / (double)Factor);
                double temp_a = 1 - A*B * Math.Pow(w, 2);
                double temp_b = (A+B)*w;
                double temp_2 = Math.Pow(temp_a, 2) + Math.Pow(temp_b, 2);
                double temp_sqrt = C / Math.Sqrt(temp_2);
                double temp = Math.Abs(temp_sqrt);
                Gain[i] = 20 * Math.Log10(temp);

                double currentPhaseA = Math.Atan(A * w) / Math.PI * 180;
                double currentPhaseB = Math.Atan(B * w) / Math.PI * 180;

                Phase[i] = 0-(currentPhaseA + currentPhaseB);

                upFunctionSeries.Points.Add(new DataPoint(i / (double)Factor, Gain[i]));
                downFunctionSeries.Points.Add(new DataPoint(i / (double)Factor, Phase[i]));
            }
            MyPlotModelUp.Series.Add(upFunctionSeries);
            MyPlotModelDown.Series.Add(downFunctionSeries);
            MyPlotModelUp.ResetAllAxes();
            MyPlotModelUp.InvalidatePlot(true);
            MyPlotModelDown.ResetAllAxes();
            MyPlotModelDown.InvalidatePlot(true);
        }
        #endregion
        }
}

5、稳定裕度

在这里插入图片描述

5.1 幅值裕度

在这里插入图片描述

5.2 相角裕度

在这里插入图片描述

参考

【1】第五章 线性系统的频域分析法:
https://buckyi.github.io/Note-Automation/%E7%BB%8F%E5%85%B8%E6%8E%A7%E5%88%B6%E7%90%86%E8%AE%BA/%E7%AC%AC05%E7%AB%A0%20%E7%BA%BF%E6%80%A7%E7%B3%BB%E7%BB%9F%E7%9A%84%E9%A2%91%E5%9F%9F%E5%88%86%E6%9E%90%E6%B3%95.html#33
【2】【自动控制原理】第5章 幅相频率特性曲线(奈氏图)及其绘制:
https://blog.csdn.net/persona5joker/article/details/140055111
【3】相角裕度与幅值裕度:
https://blog.csdn.net/qq_38972634/article/details/119787996
【4】【自动控制原理】第五章 奈奎斯特稳定判据,相角裕度和幅值裕度,对数频率特性及其绘制:
https://blog.csdn.net/persona5joker/article/details/140059710?utm_medium=distribute.pc_relevant.none-task-blog-2defaultbaidujs_baidulandingword~default-4-140059710-blog-119787996.235v43pc_blog_bottom_relevance_base8&spm=1001.2101.3001.4242.3&utm_relevant_index=7
【5】自控理论 第6章 II 相对稳定性、伯德图和闭环频率响应
https://www.cnblogs.com/harold-lu/p/15740368.html

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.coloradmin.cn/o/2069912.html

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈,一经查实,立即删除!

相关文章

Ubuntu 22.04上稳定安装与配置搜狗输入法详细教程

摘要&#xff1a;本教程详细介绍了如何在Ubuntu 22.04上安装和配置搜狗输入法&#xff0c;每个步骤详细配图。由于在Ubuntu 24.04上存在兼容性问题&#xff0c;建议用户继续使用稳定的22.04版本。教程涵盖了从更新系统源、安装fcitx输入法框架&#xff0c;到下载和配置搜狗输入…

12、stm32通过dht11读取温湿度

一、配置 二、代码 dht11.c /** dht11.c** Created on: Aug 19, 2024* Author: Administrator*/#include "main.h" #include "tim.h" #include "usart.h" #include "gpio.h" /**TIM3定时器实现us级延时*/ void Delay_us(uint16…

谷歌登录的时候,要求在手机的通知点是,并按数字来验证身份,但是手机通知栏没有收到通知和数字,原因是什么,怎么办?

前两天&#xff0c;有个朋友联系到GG账号服务&#xff0c;说他的一个谷歌账号在新设备登录的时候&#xff0c;提示说要在手机的通知栏点击谷歌发来的通知&#xff0c;点击是确认&#xff0c;并且要点按相应的数字。 但问题是他反复刷新手机的通知栏都没有看到谷歌发来的通知&a…

谷粒商城实战笔记-255~256-商城业务-消息队列-SpringBoot整合RabbitMQ

文章目录 一&#xff0c;Spring整合RabbittMq的步骤二&#xff0c;AmqpAdmin使用1. createExchange()2. testCreateQueue()3. createBinding()4&#xff0c;发送消息 这一部分讲解Spring整合RabbitMq的步骤及其使用&#xff0c;包括&#xff1a; 255-商城业务-消息队列-SpringB…

Tita的OKR :产品经理的OKR

产品经理制定的OKR&#xff0c;对组织发展有重大的意义&#xff0c;它能促使产品经理&#xff0c;产品团队&#xff0c;乃至是公司全体员工走出舒适区&#xff0c;超越能力边界。正因为挑战的存在&#xff0c;才使得产品经理才有忧患意识&#xff0c;不断改进产品&#xff0c;从…

【操作系统】10.虚拟内存管理有什么不同?

2.虚拟内存管理有什么不同&#xff1f; 2.1 虚拟内存的基本概念 虚拟内存的概念 具有请求调入和置换功能&#xff0c;从逻辑上对内存容量加以扩充的一种存储器系统 局部性原理 时间局部性 空间局部性 虚拟内存的特征 多次性 对换性 虚拟性 2.1.1 虚拟内存的实现 请求分页存储管…

了解一点电池的工作原理,让它们更好地为我们工作。【手机充电小技巧】(影响电池寿命的主要因素:过充、过放以及高温)

文章目录 引言I 充电小技巧,充分发挥电池性能随充随用都行充电时移除某些保护壳不正常的持续发烫,建议停止充电及时拔掉充电器或者关闭插座电源长期存放时,请保持一半电量。电池健康自动管理II 电池的工作原理快充为便捷,慢充保寿命。锂离子电池以充电周期方式工作,让充电更…

网络层 I(网络层的功能)【★★★★★★】

&#xff08;★★&#xff09;代表非常重要的知识点&#xff0c;&#xff08;★&#xff09;代表重要的知识点。 一、 路由与转发&#xff08;★★&#xff09; 路由器主要完成两个功能&#xff1a; 1. 路由选择 【&#xff08;确定哪一条路径&#xff09;根据路由选择协议构…

从零开始搭建Aliyun ESC高可用集群 (HaVip+KeepAlived)

从零开始搭建Aliyun ESC高可用集群 (HaVip+KeepAlived) 架构 架构 本设计方案采用两台阿里云ECS服务器搭建Keepalived结合LVS的高可用集群。使用LVS的TUN模式进行负载均衡,同时利用阿里云的弹性IP(EIP)与高可用虚拟HaVIP实现跨服务器的高可用性。架构中,一台ECS服务器作为…

一文彻底理解大模型 Agent 智能体原理和案例

1 什么是大模型 Agent &#xff1f; 大模型 Agent&#xff0c;作为一种人工智能体&#xff0c;是具备环境感知能力、自主理解、决策制定及执行行动能力的智能实体。简而言之&#xff0c;它是构建于大模型之上的计算机程序&#xff0c;能够模拟独立思考过程&#xff0c;灵活调…

防火墙基础概念与实验配置

目录 1.防火墙简介 1.1 什么是防火墙&#xff1f; 1.2 防火墙的功能 1.3 防火墙的类型 2.防火墙配置实验 2.1 基本要求 2.2 实验top 3.实验配置 3.1 基础配置 3.1.1 基础配置 3.1.2 安全域配置 3.1.3 配置安全策略 3.1.4 配置NAT 3.1.5 trust->dmz 3.1.6 端口…

代码随想录算法训练营day27 | 贪心算法 | 455.分发饼干、376.摆动序列、53.最大子序和

文章目录 理论基础解题步骤455.分发饼干思路小结 376.摆动序列简单思路贪心思路 53.最大子序和思路 今天是贪心算法的第一天 理论基础 贪心的本质是选择每一阶段的局部最优&#xff0c;从而达到全局最优 在理论上&#xff0c;能使用贪心解决的问题有两个特点&#xff1a;具有…

buuctf [HDCTF2019]Maze

前言&#xff1a;做题笔记。 常规 下载 解压 查壳 脱壳后用32IDA Pro打开。 得&#xff0c;迷宫类型的题目。(字符串有说。) 咳&#xff0c;此前思路对半分不行了。。。 合理猜测步数为&#xff1a;14。 那可以看看7 * 10的迷宫类型。(手动猜测的时候去取倍数如&#xff1a;0 2…

什么牌子的蓝牙耳机性价比高?2024年四款最值得买王牌耳机推荐!

在当前的手机备件市场中&#xff0c;蓝牙耳机已经逐渐成为智能手机备件的热门之选。然而&#xff0c;面对众多的耳机品牌和型号&#xff0c;消费者在选购时可能会感到困惑&#xff0c;稍微不留言就会买到不专业产品&#xff0c;那么什么牌子的蓝牙耳机性价比高&#xff1f;作为…

STM32的串口通信——HAL库

TTL串口 TTL串口仅仅需要两根数据线就可以进行串口通信&#xff1a; ①一条是从A设备发送的IO口连接到B设备的接收IO口 ②一条是从B设备发送的IO口连接到A设备的接收IO口 ③共地&#xff08;GND&#xff09;是两个设备通信的前提&#xff08;保证他们的电平标准一致&#x…

使用css如何获取最后一行的元素?使用css解决双边框问题

一、项目场景&#xff1a; 在小程序上需要实现一个如下图的ui效果图 需要满足以下条件 一行放不下 自动换行最后一行或者只有一行时&#xff0c;文字底部不能有线 二、初版实现 按照上面的要求&#xff0c;最开是的实现代码如下 我是给每一个元素都添加了一个下边框&#x…

Python酷库之旅-第三方库Pandas(095)

目录 一、用法精讲 406、pandas.DataFrame.index属性 406-1、语法 406-2、参数 406-3、功能 406-4、返回值 406-5、说明 406-6、用法 406-6-1、数据准备 406-6-2、代码示例 406-6-3、结果输出 407、pandas.DataFrame.columns属性 407-1、语法 407-2、参数 407-3…

楼顶气膜羽毛球馆:城市健身新空间—轻空间

随着城市化进程的加快&#xff0c;城市土地资源愈发紧张&#xff0c;如何高效利用有限的空间成为一大挑战。楼顶气膜羽毛球馆作为一种创新的体育场馆建设方式&#xff0c;凭借其独特的优势&#xff0c;逐渐成为城市健身的新宠。它不仅有效利用了楼顶闲置空间&#xff0c;还为市…

新160个crackme - 039-eKH.1

运行分析 需要破解Name和Serial&#xff0c;写出注册机 PE分析 - Delphi程序&#xff0c;32位&#xff0c;无壳 静态分析&动态调试 ida搜索关键字符串&#xff0c;跳转到关键代码 静态分析&#xff0c;修改变量如上&#xff0c;关键在于sub_427A20函数返回值需要大于等于1…

“双指针”算法下篇

WeChat_20240806081335 对双指针这一思想在OJ 里面的相关应用&#xff0c;感兴趣的友友们&#xff0c;可以看下此篇博客 https://blog.csdn.net/X_do_myself/article/details/141291451?spm1001.2014.3001.5502 目录 一盛最多水的容器 1题目链接&#xff1a;盛最多水的容器…