PID(比例-积分-微分)控制器广泛应用于工业控制中。虽然其结构简单,但如何选择合适的比例增益 、积分时间 和微分时间 是实现良好控制性能的关键。本文将详细介绍一种经典且实用的 PID 参数整定方法——Ziegler-Nichols 法。
物联网(IoT)设备的远程监控与控制是现代智能系统的基础需求。本文将介绍一个基于MQTT协议的设备监控与控制系统,该系统由两部分组成:模拟单片机设备和PyQt客户端。我们将详细讨论系统的设计思路、代码实现以及实际应用场景。
之前博客介绍了如何搭建EMQX:https://www.dong-blog.fun/post/1963
本博客在 EMQX 中配置规则将数据写入 MySQL,可以通过 规则引擎 + 数据桥接 实现。以下是详细步骤:
论文:https://arxiv.org/pdf/2407.17490 https://github.com/YuxiangChai/AMEX-codebase/tree/main/data_utils https://huggingface.co/datasets/Yuxiang007/AMEX
AMEX数据集包括三个层次的注释:
在 Ubuntu 22.04 上,我们经常需要查看当前的网络带宽占用情况,尤其是下载大文件时,了解实时的下载速度可以帮助我们判断网络状况或管理下载任务。本文将介绍几种简单有效的方法来监控 Ubuntu 22.04 的下载带宽,包括终端工具和图形界面方案。
为什么极点在左半平面(LHP)系统就会稳定?
在控制系统中,极点的位置决定了系统的动态响应和稳定性。具体原因如下:
时域响应分析: • 对于连续时间系统,传递函数的极点 对应的时域模态为 。
• 若极点 在左半平面(LHP)(即 ),则 会指数衰减,系统最终趋于稳定。
• 若极点 在右半平面(RHP)(即 ),则 会指数发散,系统不稳定。
• 若极点在虚轴上(),则系统处于临界稳定(如持续振荡)。
稳定性判据: • BIBO稳定性(有界输入有界输出):所有极点必须在左半平面。
• Lyapunov稳定性:对于线性系统,LHP极点等价于渐近稳定。
LQR控制原理与倒立摆系统实践指南
一、问题背景:惯性轮倒立摆控制 我们面对的是一个典型的欠驱动系统——惯性轮倒立摆(Inertia Wheel Pendulum)。系统通过控制惯性轮电机产生反扭矩来维持摆杆竖直平衡。系统参数如下:
构建新的镜像:
展开代码docker build --network=host --build-arg http_proxy=http://10.136.19.26:10828 --build-arg https_proxy=http://10.136.19.26:10828 -f Dockerfile -t kevinchina/deeplearning:vlmr1-0501 . # 进容器装环境: apt-get update apt-get install libibverbs1 pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple pip install babel python-Levenshtein matplotlib pycocotools timm==1.0.15 # Addtional modules pip install wandb==0.18.3 pip install tensorboardx pip install qwen_vl_utils torchvision pip install flash-attn --no-build-isolation pip install babel pip install python-Levenshtein pip install matplotlib pip install pycocotools pip install openai pip install httpx[socks] pip install json_repair
展开代码docker commit 4411ba9deb19 kevinchina/deeplearning:vlmr1-0501-1
在MATLAB中,将状态空间模型转换为传递函数可以通过以下步骤完成:
ss
和 tf
函数matlab展开代码A = [...]; % 状态矩阵 B = [...]; % 输入矩阵 C = [...]; % 输出矩阵 D = [...]; % 直接传输矩阵
matlab展开代码sys_ss = ss(A, B, C, D);
matlab展开代码sys_tf = tf(sys_ss);
matlab展开代码sys_tf = minreal(sys_tf);
状态空间方程与传递函数的关系详解
在控制系统中,状态空间方程和传递函数是两种常用的数学模型,它们分别代表了现代控制理论和经典控制理论的核心工具。本文将深入探讨它们之间的内在联系与相互转换方法,并通过实例解析帮助读者更好地理解这两种模型的关系。
状态空间方程(State-Space Equation)是现代控制理论中描述动态系统的核心数学模型,它将系统的输入、输出和内部状态变量通过矩阵形式关联起来。以下是详细解释:
在带有惯性轮的倒立摆系统中,使用拉格朗日方程进行分析时,确定摆杆角度和惯性轮角度的方程右边的步骤如下:
• 惯性轮角度:定义为惯性轮相对于摆杆的转角,记为 。惯性轮的绝对转角为 。
本地模型目录需要是git仓库:
bash展开代码git init
bash展开代码git remote add origin https://huggingface.co/hugxd/InternVL2_8B_Point_to_Box
《SWING UP AND BALANCING OF A REACTION WHEEL INVERTED PENDULUM》
https://github.com/B-Paweekorn/Reaction-wheel-inverted-pendulum
image_max_pixels, 这里的 area 就是宽*高
python展开代码# 在src/llamafactory/data/mm_plugin.py中定义
# 控制图像处理时的最大像素数量
# 如果图像超过这个像素数,会被调整大小
def get_image_processor_preprocess_params(image_processor):
params = {}
if hasattr(image_processor, "crop_size"): # for CLIP
params["crop_size"] = {
"height": image_processor.crop_size["height"],
"width": image_processor.crop_size["width"]
}
params["size"] = max(params["crop_size"]["height"], params["crop_size"]["width"])
elif hasattr(image_processor, "size"):
if isinstance(image_processor.size, dict): # for Qwen
params["size"] = image_processor.size["max_edge"]
elif isinstance(image_processor.size, list): # for InternVL
params["size"] = image_processor.size
else:
params["size"] = image_processor.size
# image_max_pixels用于确保图像不会太大,超出内存
if params.get("size", None) is not None and hasattr(image_processor, "image_max_pixels"):
area = image_processor.image_max_pixels # 来自training_args.image_max_pixels
size = int(math.sqrt(area))
params["size"] = size
return params
展开代码register_model_group( models={ "InternVL2.5-1B-MPO": { DownloadSource.DEFAULT: "kingsley01/InternVL2_5-1B-MPO-hf", DownloadSource.MODELSCOPE: "llamafactory/InternVL2_5-1B-MPO-hf", }, "InternVL2.5-2B-MPO": { DownloadSource.DEFAULT: "kingsley01/InternVL2_5-2B-MPO-hf", DownloadSource.MODELSCOPE: "llamafactory/InternVL2_5-2B-MPO-hf", }, "InternVL2.5-4B-MPO": { DownloadSource.DEFAULT: "kingsley01/InternVL2_5-4B-MPO-hf", DownloadSource.MODELSCOPE: "llamafactory/InternVL2_5-4B-MPO-hf", }, "InternVL2.5-8B-MPO": { DownloadSource.DEFAULT: "kingsley01/InternVL2_5-8B-MPO-hf", DownloadSource.MODELSCOPE: "llamafactory/InternVL2_5-8B-MPO-hf", }, "InternVL3-1B-hf": { DownloadSource.DEFAULT: "kingsley01/InternVL3-1B-hf", DownloadSource.MODELSCOPE: "llamafactory/InternVL3-1B-hf", }, "InternVL3-2B-hf": { DownloadSource.DEFAULT: "kingsley01/InternVL3-2B-hf", DownloadSource.MODELSCOPE: "llamafactory/InternVL3-2B-hf", }, "InternVL3-8B-hf": { DownloadSource.DEFAULT: "kingsley01/InternVL3-8B-hf", DownloadSource.MODELSCOPE: "llamafactory/InternVL3-8B-hf", }, }, template="intern_vl", multimodal=True, )
InternVL(Internal Vision-Language model)是一个开源的多模态大型模型项目,由上海人工智能实验室(OpenGVLab)开发。InternVL 1是该项目的第一个主要版本,它通过创新的视觉-语言融合方法,实现了强大的图像理解和多模态对话能力。本文将深入分析InternVL 1的技术架构、关键特性和创新点,以提供对该模型的全面了解。
InternVL采用了一种称为"Spatial Layout Projector (SLP)"的方法,将四维的空间坐标[x1,y1,x2,y2](一个bounding box)转换为单个token嵌入:
"A key innovation in LayTextLLM is the Spatial Layout Projector (SLP), which transforms a spatial layout into a singular bounding box token. This enhancement enables the model to process both spatial layouts and textual inputs simultaneously. To be specifically, each OCR-derived spatial layout is represented by a bounding box defined by four-dimensional coordinates [x1,y1,x2,y2]..."
这种方法确实将每个边界框(box)表示为一个token,不同于之前的"coordinate-as-tokens"方案(这种方案会将坐标转换为多个token):
"Compared to the coordinate-as-tokens scheme, the SLP represents each bounding box with a single token. This approach significantly reduces the number of input tokens..."
这种单token表示法的计算方式是通过将坐标映射到高维空间来实现的:
"The process can be computed as z=W⋅c+b, where c∈ℝ^4 is the vector of the bounding box coordinates. W∈ℝ^(d×4) is a weight matrix with d represents the dimension of the embedding, b∈ℝ^(d×1) is a bias vector, z is the resulting bounding box token represented as an d-dimensional embedding."