STM32无刷电机全套开发资料(源码、原理图、PCB工程及说明文档)

目录

1、原理图、PCB、BOOM表

2、设计描述 

2.1 前言

2.2 设计电路规范

 3、代码

4、资料清单

资料下载地址:STM32无刷电机全套开发资料(源码、原理图、PCB工程及说明文档)

1、原理图、PCB、BOOM表

 

2、设计描述 

2.1 前言

        经过一个星期的画PCB,今天终于化了,整体看上去还比较满意,具体的性能基本满足需求

2.2 设计电路规范

 1、线间距。

      这里应该遵循3W规则,所谓3W就是为了减少线间串扰,应保证线间距足够大,当线中心不少于3倍线宽,则可 保持70%的电场不互相干扰。如要达到98%的电场不互相干扰,可使用10W的间距。——这是查阅华为PCB布线规则所得。

 

     2、电源线过细。

      这里我查阅了华为PCB教程得到了下面一个表格。这里线宽跟所能承受最大电流的关系表

  3、电源环路。(用图说明)

 3、代码

/*This file is part of AutoQuad ESC32.AutoQuad ESC32 is free software: you can redistribute it and/or modifyit under the terms of the GNU General Public License as published bythe Free Software Foundation, either version 3 of the License, or(at your option) any later version.AutoQuad ESC32 is distributed in the hope that it will be useful,but WITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See theGNU General Public License for more details.You should have received a copy of the GNU General Public Licensealong with AutoQuad ESC32.  If not, seeCopyright © 2011, 2012, 2013  Bill Nesbitt
*/#include "run.h"
#include "main.h"
#include "timer.h"
#include "adc.h"
#include "fet.h"
#include "pwm.h"
#include "cli.h"
#include "binary.h"
#include "config.h"
#include "misc.h"
#include "stm32f10x_exti.h"
#include "stm32f10x_pwr.h"
#include "stm32f10x_iwdg.h"
#include "stm32f10x_dbgmcu.h"
#include <math.h>uint32_t runMilis;   //systick中断中自加.没有什么控制用途
static uint32_t oldIdleCounter;  //上次main函数中,死循环次数.
float idlePercent;   //空闲时间百分比(在main循环里,什么事情也不做.main死循环运行的时间)
float avgAmps, maxAmps; //平均电流, 最大电流
float avgVolts;      //当前ADC采集转换后的电池电压(也就是12v)float rpm;           //当前转速(1分钟多少转) 测量值 在runRpm函数中计算出来.在runThrotLim中还要继续使用.
float targetRpm;     //目标转速 设定值(只在闭环 或 闭环推力模式下使用此变量)static float rpmI;
static float runRPMFactor;
static float maxCurrentSQRT;  //最大电流 平方根 后
uint8_t disarmReason;//此变量没啥作用.只用于给上位机显示当前的 调试代码(或者说停止电机的原因)
uint8_t commandMode; //串口通讯的模式, cli是ascii模式, binary是二进制通讯模式
static uint8_t runArmCount;
volatile uint8_t runMode;//运行模式 (开环模式, RPM模式, 推力模式, 伺服模式)
static float maxThrust;//执行看门狗喂狗
void runFeedIWDG(void) {
#ifdef RUN_ENABLE_IWDGIWDG_ReloadCounter();
#endif
}// setup the hardware independent watchdog
// 初始化并开启独立看门狗
uint16_t runIWDGInit(int ms)
{
#ifndef RUN_ENABLE_IWDGreturn 0;
#elseuint16_t prevReloadVal;int reloadVal;IWDG_ReloadCounter();//喂狗DBGMCU_Config(DBGMCU_IWDG_STOP, ENABLE);//当在jtag调试的时候.停止看门狗// IWDG timeout equal to 10 ms (the timeout may varies due to LSI frequency dispersion)// Enable write access to IWDG_PR and IWDG_RLR registersIWDG_WriteAccessCmd(IWDG_WriteAccess_Enable);//允许访问IWDG_PR和IWDG_RLR寄存器// IWDG counter clock: LSI/4IWDG_SetPrescaler(IWDG_Prescaler_4);// Set counter reload value to obtain 10ms IWDG TimeOut.//  Counter Reload Value        = 10ms/IWDG counter clock period//                                = 10ms / (RUN_LSI_FREQ/4)//                                = 0.01s / (RUN_LSI_FREQ/4)//                                = RUN_LSI_FREQ/(4 * 100)//                                = RUN_LSI_FREQ/400reloadVal = RUN_LSI_FREQ*ms/4000;if (reloadVal < 1)reloadVal = 1;else if (reloadVal > 0xfff)reloadVal = 0xfff;prevReloadVal = IWDG->RLR;IWDG_SetReload(reloadVal);// Reload IWDG counterIWDG_ReloadCounter();// Enable IWDG (the LSI oscillator will be enabled by hardware)IWDG_Enable();return (prevReloadVal*4000/RUN_LSI_FREQ);
#endif
}//esc32 非正常停止运行 进入初始化
void runDisarm(int reason) {fetSetDutyCycle(0);  //fet占空比设置为0timerCancelAlarm2();state = ESC_STATE_DISARMED;pwmIsrAllOn();digitalHi(statusLed);   // turn offdigitalLo(errorLed);    // turn ondisarmReason = reason;  // 设置停机原因.给上位机查看状态使用
}//手动运行
void runArm(void) {int i;fetSetDutyCycle(0);timerCancelAlarm2();digitalHi(errorLed);digitalLo(statusLed);   // turn onif (runMode == SERVO_MODE) {state = ESC_STATE_RUNNING;}else {state = ESC_STATE_STOPPED;if (inputMode == ESC_INPUT_UART)runMode = OPEN_LOOP;fetSetBraking(0);}// extra beeps signifying run modefor (i = 0; i < runMode + 1; i++) {fetBeep(250, 600);timerDelay(10000);}//        fetBeep(150, 800);
}//电机开始运行
void runStart(void) {// reset integral bevore new motor startuprunRpmPIDReset();//先复位I值if ((p[START_ALIGN_TIME] == 0) && (p[START_STEPS_NUM] == 0)) {state = ESC_STATE_STARTING;  //设置为准备启动状态fetStartCommutation(0);//换向启动}else {motorStartSeqInit();//普通启动}
}//电机停止运行
void runStop(void) {runMode = OPEN_LOOP;fetSetDutyCycle(0);
}//设置运行的占空比 duty = 0~100
uint8_t runDuty(float duty) {uint8_t ret = 0;if (duty >= 0.0f || duty <= 100.0f) {runMode = OPEN_LOOP;fetSetBraking(0);fetSetDutyCycle((uint16_t)(fetPeriod*duty*0.01f));//最大周期 * 占空比(0~100) / 100ret = 1;}return ret;
}//pwm.c中断中调用  或  串口命令输入调用
void runNewInput(uint16_t setpoint) {static uint16_t lastPwm;static float filteredSetpoint = 0;// Lowpass Input if configured// TODO: Make lowpass independent from pwm update rateif (p[PWM_LOWPASS]) {filteredSetpoint = (p[PWM_LOWPASS] * filteredSetpoint + (float)setpoint) / (1.0f + p[PWM_LOWPASS]);setpoint = filteredSetpoint;}if (state == ESC_STATE_RUNNING && setpoint != lastPwm){if (runMode == OPEN_LOOP){//开环模式fetSetDutyCycle(fetPeriod * (int32_t)(setpoint-pwmLoValue) / (int32_t)(pwmHiValue - pwmLoValue));}else if (runMode == CLOSED_LOOP_RPM){//闭环转速模式float target = p[PWM_RPM_SCALE] * (setpoint-pwmLoValue) / (pwmHiValue - pwmLoValue);// limit to configured maximumtargetRpm = (target > p[PWM_RPM_SCALE]) ? p[PWM_RPM_SCALE] : target;}// THRUST Modeelse if (runMode == CLOSED_LOOP_THRUST){//闭环推力模式float targetThrust;  // desired trustfloat target;        // target(rpm)// Calculate targetThrust based on input and MAX_THRUSTtargetThrust = maxThrust * (setpoint-pwmLoValue) / (pwmHiValue - pwmLoValue);// Workaraound: Negative targetThrust will screw up sqrtf() and create MAX_RPM on throttle min. Dangerous!if (targetThrust > 0.0f) {// Calculate target(rpm) based on targetThrusttarget = ((sqrtf(p[THR1TERM] * p[THR1TERM] + 4.0f * p[THR2TERM] * targetThrust) - p[THR1TERM] ) / ( 2.0f * p[THR2TERM] ));}// targetThrust is negative (pwm_in < pwmLoValue)else {target = 0.0f;}// upper limit for targetRpm is configured maximum PWM_RPM_SCALE (which is MAX_RPM)targetRpm = (target > p[PWM_RPM_SCALE]) ? p[PWM_RPM_SCALE] : target;}else if (runMode == SERVO_MODE){//伺服模式下fetSetAngleFromPwm(setpoint);}lastPwm = setpoint;}else if ((state == ESC_STATE_NOCOMM || state == ESC_STATE_STARTING) && setpoint <= pwmLoValue){fetSetDutyCycle(0);state = ESC_STATE_RUNNING;}else if (state == ESC_STATE_DISARMED && setpoint > pwmMinValue && setpoint <= pwmLoValue){runArmCount++;if (runArmCount > RUN_ARM_COUNT)runArm();}else {runArmCount = 0;}if (state == ESC_STATE_STOPPED && setpoint >= pwmMinStart) {//电机开始运行runStart();}
}//电调运行看门狗. 主要是判断电调的当前一些状态.做出停机等处理
static void runWatchDog(void)
{register uint32_t t, d, p;//__asm volatile ("cpsid i");//CPSID_I();__disable_irq();t = timerMicros;      //当前的系统tick时间d = detectedCrossing;p = pwmValidMicros;   //在PWM输入模式下.把timerMicros的时间赋值给此变量//__asm volatile ("cpsie i");//CPSIE_I();__enable_irq();if (state == ESC_STATE_STARTING && fetGoodDetects > fetStartDetects) //这里要检测到fetStartDetects好的检测,才允许切换电机状态{//是启动状态.切换到 运行状态state = ESC_STATE_RUNNING;digitalHi(statusLed);   // turn off}else if (state >= ESC_STATE_STOPPED){//运行模式状态下.会一直在这里检测状态.如果状态不对出错.会调用runDisarm函数停止// running or startingd = (t >= d) ? (t - d) : (TIMER_MASK - d + t);// timeout if PWM signal disappearsif (inputMode == ESC_INPUT_PWM){//PWM模式 判断PWM输入是否超时p = (t >= p) ? (t - p) : (TIMER_MASK - p + t);if (p > PWM_TIMEOUT)runDisarm(REASON_PWM_TIMEOUT);//pwm输入超时}if (state >= ESC_STATE_STARTING && d > ADC_CROSSING_TIMEOUT){if (fetDutyCycle > 0) {runDisarm(REASON_CROSSING_TIMEOUT);//错误停止}else{runArm();//手动运行起来pwmIsrRunOn();//PWM开启输入比较}}else if (state >= ESC_STATE_STARTING && fetBadDetects > fetDisarmDetects)  //运行状态中  检测到错误的个数后.进入这个判断{//在运行过程中,出现错误.停止运行if (fetDutyCycle > 0)runDisarm(REASON_BAD_DETECTS);//错误停止}else if (state == ESC_STATE_STOPPED){//停止模式adcAmpsOffset = adcAvgAmps;        // record current amperage offset}}else if (state == ESC_STATE_DISARMED && !(runMilis % 100)){//停止模式下adcAmpsOffset = adcAvgAmps;        // record current amperage offsetdigitalTogg(errorLed);}
}void runRpmPIDReset(void) {rpmI = 0.0f;
}//这个应该是计算PID
//rpm:测量的转速值
//target:目标的转速值
static int32_t runRpmPID(float rpm, float target) {float error;float ff, rpmP;float iTerm = rpmI;float output;// feed forwardff = ((target*target* p[FF1TERM] + target*p[FF2TERM]) / avgVolts) * fetPeriod;error = (target - rpm);//计算出偏差if (error > 1000.0f)error = 1000.0f;if (error > 0.0f) {rpmP = error * p[PTERM];  //PrpmI += error * p[ITERM]; //I}else {rpmP =  error * p[PTERM] * p[PNFAC];rpmI += error * p[ITERM] * p[INFAC];}if (fetBrakingEnabled){//开启了制动模式if (rpm < 300.0f) {fetSetBraking(0);}else if (error <= -100.0f) {fetSetBraking(1);}else if (fetBraking && error > -25.0f){fetSetBraking(0);}}output = ff + (rpmP + rpmI) * (1.0f / 1500.0f) * fetPeriod;// don't allow integral to continue to rise if at max outputif (output >= fetPeriod)rpmI = iTerm;return output;
}//计算出电机转速,根据当前转速计算出PID输出值,设置占空比
static uint8_t runRpm(void)
{if (state > ESC_STATE_STARTING){//电机处于运行状态 计算出当前转速rpm//        rpm = rpm * 0.90f + (runRPMFactor / (float)crossingPeriod) * 0.10f;//        rpm -= (rpm - (runRPMFactor / (float)crossingPeriod)) * 0.25f;//        rpm = (rpm + (runRPMFactor / (float)crossingPeriod)) * 0.5f;//        rpm = (rpm + ((32768.0f * runRPMFactor) / (float)adcCrossingPeriod)) * 0.5f; // increased resolution, fixed filter hererpm = p[RPM_MEAS_LP] * rpm + ((32768.0f * runRPMFactor) / (float)adcCrossingPeriod) * (1.0f - p[RPM_MEAS_LP]); // increased resolution, variable filter here// run closed loop controlif (runMode == CLOSED_LOOP_RPM){//运行在闭环模式下fetSetDutyCycle(runRpmPID(rpm, targetRpm));return 1;}// run closed loop control also for THRUST modeelse if (runMode == CLOSED_LOOP_THRUST){//运行在闭环推力模式fetSetDutyCycle(runRpmPID(rpm, targetRpm));return 1;}else{return 0;}}else{//电机在停止状态下rpm = 0.0f;return 0;}
}static void runSetupPVD(void) {EXTI_InitTypeDef EXTI_InitStructure;NVIC_InitTypeDef NVIC_InitStructure;// Configure EXTI Line16(PVD Output) to generate an interrupt on rising and falling edgesEXTI_ClearITPendingBit(EXTI_Line16);EXTI_InitStructure.EXTI_Line = EXTI_Line16;EXTI_InitStructure.EXTI_Mode = EXTI_Mode_Interrupt;EXTI_InitStructure.EXTI_Trigger = EXTI_Trigger_Rising;EXTI_InitStructure.EXTI_LineCmd = ENABLE;EXTI_Init(&EXTI_InitStructure);// Enable the PVD InterruptNVIC_InitStructure.NVIC_IRQChannel = PVD_IRQn;NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;NVIC_Init(&NVIC_InitStructure);// Configure the PVD Level to 2.2VPWR_PVDLevelConfig(PWR_PVDLevel_2V2);//配置pvd电压等级.当电压小于2.2V的时候产生中断// Enable the PVD OutputPWR_PVDCmd(ENABLE);
}void runInit(void) {runSetupPVD();runSetConstants();runMode = p[STARTUP_MODE];//启动 运行模式//系统tickcount时钟SysTick_Config(SystemCoreClock / 1000); // 1msNVIC_SetPriority(SysTick_IRQn, 2);            // lower priority// setup hardware watchdogrunIWDGInit(20);
}#define RUN_CURRENT_ITERM        1.0f
#define RUN_CURRENT_PTERM        10.0f
#define RUN_MAX_DUTY_INCREASE        1.0ffloat currentIState;//根据PID计算出PWM占空比的值
static int32_t runCurrentPID(int32_t duty) {float error;float pTerm, iTerm;error = avgAmps - p[MAX_CURRENT];currentIState += error;if (currentIState < 0.0f)currentIState = 0.0f;iTerm = currentIState * RUN_CURRENT_ITERM;pTerm = error * RUN_CURRENT_PTERM;if (pTerm < 0.0f)pTerm = 0.0f;duty = duty - iTerm - pTerm;if (duty < 0)duty = 0;return duty;
}//计算得到实际的占空比fetActualDutyCycle
//参数duty:实际上就是fetDutyCycle传递进来的.想要运行的周期
static void runThrotLim(int32_t duty)
{float maxVolts; //最大的电压int32_t maxDuty;//最大的周期// only if a limit is setif (p[MAX_CURRENT] > 0.0f){//如果实际的占空比和设置的占空比不一样.那么会实时改变CPU的PWM寄存器.// if current limiter is calibrated - best performance   使用电流限制器校准.性能最好if (p[CL1TERM] != 0.0f){maxVolts = p[CL1TERM] + p[CL2TERM]*rpm + p[CL3TERM]*p[MAX_CURRENT] + p[CL4TERM]*rpm*maxCurrentSQRT + p[CL5TERM]*maxCurrentSQRT;maxDuty = maxVolts * (fetPeriod / avgVolts);if (duty > maxDuty)fetActualDutyCycle = maxDuty;elsefetActualDutyCycle = duty;}// otherwise, use PID - less accurate, lower performance  使用PID来计算.不大准确.性能低else{fetActualDutyCycle += fetPeriod * (RUN_MAX_DUTY_INCREASE * 0.01f);if (fetActualDutyCycle > duty)fetActualDutyCycle = duty;fetActualDutyCycle = runCurrentPID(fetActualDutyCycle);//用PID来计算出当前要运行的占空比}}else {fetActualDutyCycle = duty;}//设置到CPU寄存器里.算出来的实际PWM占空比_fetSetDutyCycle(fetActualDutyCycle);
}//系统tickcount中断
void SysTick_Handler(void) {// reload the hardware watchdogrunFeedIWDG();avgVolts = adcAvgVolts * ADC_TO_VOLTS;                     //转换后的电池电压(一般是12V) = ADC采集电压原始值 * 电压算法avgAmps = (adcAvgAmps - adcAmpsOffset) * adcToAmps;        //平均电流 = (当前电流 - 停止时候的电流) * 转换公式maxAmps = (adcMaxAmps - adcAmpsOffset) * adcToAmps;        //最大电流 = (最大电流 - 停止时候的电流) * 转换公式if (runMode == SERVO_MODE){//伺服模式fetUpdateServo();}else{runWatchDog();//检测电调的状态.做出相应的停机处理runRpm();     //计算RPM,计算PID,设置运行PWM占空比runThrotLim(fetDutyCycle);//计算得到实际PWM占空比.如果有偏差.那么在这里会实时改变PWM的占空比值}//计算空闲时间百分比 通过串口发送给上位机  没什么用途idlePercent = 100.0f * (idleCounter-oldIdleCounter) * minCycles / totalCycles;
//  空闲时间百分比 = 100 * (本次循环次数 - 上次循环次数) * 最小周期 / 总共周期oldIdleCounter = idleCounter;totalCycles = 0;//处理串口数据 和串口交互使用的if (commandMode == CLI_MODE)cliCheck();    //ascii模式elsebinaryCheck(); //二进制模式runMilis++;
}//低电压中断
void PVD_IRQHandler(void) {// voltage dropping too lowif (EXTI_GetITStatus(EXTI_Line16) != RESET) {// shut everything downrunDisarm(REASON_LOW_VOLTAGE);// turn on both LEDsdigitalLo(statusLed);digitalLo(errorLed);EXTI_ClearITPendingBit(EXTI_Line16);}
}void runSetConstants(void) {int32_t startupMode = (int)p[STARTUP_MODE];float maxCurrent = p[MAX_CURRENT];//运行模式if (startupMode < 0 || startupMode >= NUM_RUN_MODES)startupMode = 0;if (maxCurrent > RUN_MAX_MAX_CURRENT)maxCurrent = RUN_MAX_MAX_CURRENT;else if (maxCurrent < RUN_MIN_MAX_CURRENT)maxCurrent = RUN_MIN_MAX_CURRENT;runRPMFactor = (1e6f * (float)TIMER_MULT * 120.0f) / (p[MOTOR_POLES] * 6.0f);maxCurrentSQRT = sqrtf(maxCurrent);p[MOTOR_POLES] = (int)p[MOTOR_POLES];p[STARTUP_MODE] = startupMode;p[MAX_CURRENT] = maxCurrent;// Calculate MAX_THRUST from PWM_RPM_SCALE (which is MAX_RPM) and THRxTERMs// Based on "thrust = rpm * a1 + rpm^2 * a2"maxThrust = p[PWM_RPM_SCALE] * p[THR1TERM] + p[PWM_RPM_SCALE] * p[PWM_RPM_SCALE] * p[THR2TERM];
}

4、资料清单

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

如若内容造成侵权/违法违规/事实不符,请联系编程知识网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

C语言: 字符串函数(下)

片头 在上一篇中,我们介绍了字符串函数。在这一篇章中&#xff0c;我们将继续学习字符串函数&#xff0c;准备好了吗&#xff1f;开始咯&#xff01; 1.strncpy函数 1.1 strncpy函数的用法 strncpy是C语言中的一个字符串处理函数&#xff0c;它用于将一个字符串的一部分内容…

[lesson27]二阶构造模式

二阶构造模式 构造函数的回顾 关于构造函数 类的构造函数用于对象的初始化构造函数与类同名并且没有返回值构造函数在对象定义时自动被调用 你该知道的真相 构造函数 只提供自动初始化成员变量的机会不能保证初始化逻辑一定成功执行return语句后构造函数立即结束 构造函数…

学浪已购买视频怎么下载到本地?

许多学习者在学浪购买了丰富的课程&#xff0c;然而&#xff0c;一些课程存在时间限制&#xff0c;使得学习者希望将其下载并永久保存。在这里&#xff0c;我们将介绍一款名为小浪助手的工具&#xff0c;它能够帮助你轻松将学浪已购买的视频下载到本地&#xff0c;让学习变得更…

Python匿名函数4不要

当你需要完成一件小工作时&#xff0c;在本地环境中使用这个函数&#xff0c;可以让工作如此得心应手&#xff0c;它就是Lambda 函数。 Lambda 函数是 Python 中的匿名函数。有些人将它们简称为lambdas&#xff0c;它们的语法如下&#xff1a; lambda arguments: expressionl…

[通俗易懂:Linux标准输入/输出和重定向]Shell脚本之 > /dev/null 2>1命令详解

目录标题 一、> /dev/null 2>&1 命令解析二、/dev/null 文件浅显理解三、标准输入、标准输出、标准错误输出四、输入重定向、输出重定向五、命令作用与应用场景 如果想看命令意义&#xff0c;可以直接跳到第五部分 一、> /dev/null 2>&1 命令解析 我们在别…

了解大语言模型的参数高效微调(Parameter-Effcient Fine-Tuning)

&#x1f349; CSDN 叶庭云&#xff1a;https://yetingyun.blog.csdn.net/ 大语言模型在众多应用领域实现了突破性的进步&#xff0c;显著提升了各种任务的完成度。然而&#xff0c;其庞大的规模也带来了高昂的计算成本。这些模型往往包含数十亿甚至上千亿参数&#xff0c;需要…

【spring】@Profile注解学习

Profile介绍 在Spring框架中&#xff0c;Profile注解用于根据特定的配置文件来有条件地激活或禁用Bean的定义。这在开发和测试过程中非常有用&#xff0c;因为它允许你为不同的环境&#xff08;如开发、测试、生产&#xff09;定义不同的配置。 Profile不仅可以标注在方法上&…

fastjson 序列化问题

问题: 使用fastjson 的 对同一个JSONObject对象 多次引用后, 通过 JSON.toJSONString() 方法进行json序列化时出现只有第一次的可以成功序列化未json string 字符串, 后面的对象都为引用地址; 示例: public static void main(String[] args) {JSONObject jsonObject new JSON…

【leetcode面试经典150题】28.盛最多水的容器(C++)

【leetcode面试经典150题】专栏系列将为准备暑期实习生以及秋招的同学们提高在面试时的经典面试算法题的思路和想法。本专栏将以一题多解和精简算法思路为主&#xff0c;题解使用C语言。&#xff08;若有使用其他语言的同学也可了解题解思路&#xff0c;本质上语法内容一致&…

代码学习记录42---动态规划

随想录日记part42 t i m e &#xff1a; time&#xff1a; time&#xff1a; 2024.04.14 主要内容&#xff1a;今天开始要学习动态规划的相关知识了&#xff0c;今天的内容主要涉及&#xff1a;最长递增子序列 &#xff1b;最长连续递增序列 &#xff1b;最长重复子数组 ;最长公…

selenium添加代理(有账号密码)

以下为各种尝试的记录&#xff0c;正确实现可直接参考最后一条&#xff01; 1&#xff0c;导入Proxy库来添加capabilities属性&#xff1a;可以访问网站&#xff0c;但ip还是本机ip from selenium import webdriver from selenium.webdriver.chrome.options import Options f…

【C++学习】C++11新特性(第一节)

文章目录 ♫一.文章前言♫二.C11新特性♫一.统一的列表初始化♫二.std::initializer_list♫三.声明♫四.decltype关键字♫五.nullptr♫六.新增加容器---静态数组array、forward_list以及unordered系列♫6.1unordered_map与unoredered_set♫6.2array♫6.3 forward_list&#xff…