2_Boost_Open_Loop

本文通过模拟实验探讨了开环Boost电路的工作原理及其参数变化对输出电压的影响。实验结果显示,当采用默认参数时,输出电压稳定在60V左右;降低电容值会导致输出电压波动增大;改变PWM脉冲宽度可以显著调整输出电压水平。
A simulation of the Open Loop Boost Circuit:

Default Value :

1. DC Power : 30V
2. L = 5e-2 H
3. C = 1e-2 F
4. Load : R = 40Ω
5. PWM Frenquency : 400Hz
6. Pulse Width : 50%

  According to the Output Regulation: the output voltage is 1/(1-D). Also, the higher vaule of the capacitor which is for filtering the harmonic wave the less fluctuation can we get.

First Experiment:( Default Vaule )

  We can see through the output voltage waveform in the Scope that the vaule of the output voltage is precisely close to 60V which is corresponding with the analysis that we've discussed above.
  As it is a Open Loop Controled, there can be a massive Overshoot in the output. The substantial reason is that there has a process for Charging the capacitor & the output voltage follows the 1/(1-D) which is not linear. One specific approach to lower the overshoot is to change the control mode to the Closed Loop. The overshoot is not just do harm to the Load but may also cause the MOSFET with lower efficient or even destory the MOSFET.

Second Experiment:( Lower the Capacitor Value )

  If we lower the Capacitor value as such, we may get a higher flutuation output according to what we've learnt.
  After evaluate the capacitor as 1e-4F, we can see clearly that the output voltage varied between 50V to 70V, and has a average value about 60V. So a keypoint to improve the output voltage waveform is that choose the value of the Capacitor wisely.

Third Experiment:( Change the PWM Pulse Width )

  At the beginning we Lower the Pulse Width to 0.2, and the output voltage is close to 37.5V correspondingly. Then we higher the pulse width to 0.8 then the output is a little bit lower than 150V which is because that the inner resistance cause higher voltage drop since the output current has been ascented. And of course the infinite output value could not be gotten even though we change the D to 1.




<think>我们正在处理一个ROS运行时的错误。用户运行了`rosrun supervins_loop_fusion supervins_loop_fusion_node`并指定了一个配置文件,但程序在加载词汇表文件时崩溃,抛出了一个`std::runtime_error`异常,提示无法打开文件`/home/aaa/catkin_ws/src/SuperVINS/supervins_loop_fusion/src/ThirdParty/Voc/superpoint1.yml.gz`。 ### 错误分析 1. **文件路径错误**:错误信息显示程序尝试在路径`/home/aaa/catkin_ws/src/SuperVINS/supervins_loop_fusion/src/ThirdParty/Voc/superpoint1.yml.gz`打开文件,但该路径可能不正确或文件不存在。 2. **配置文件问题**:在输出的第二行显示`vocabulary_file`后面直接跟了路径,没有空格(可能是打印问题),但错误路径与配置文件中的设置有关。 ### 解决方案步骤 #### 1. 检查文件是否存在 ```bash ls /home/aaa/catkin_ws/src/SuperVINS/supervins_loop_fusion/src/ThirdParty/Voc/superpoint1.yml.gz ``` - 如果文件不存在,需要重新获取该文件(可能是从项目源码或作者提供的资源中获取)。 #### 2. 检查配置文件中的路径设置 打开配置文件`~/catkin_ws/src/SuperVINS/config/euroc/euroc_mono_imu_config.yaml`,查找`vocabulary_file`配置项。确保路径正确,并且是绝对路径或相对于可执行文件的正确相对路径。 #### 3. 修正配置文件路径 如果文件实际存在但路径不一致,修改配置文件中的路径为实际路径。例如: ```yaml # 假设实际路径为 vocabulary_file: "/home/aaa/catkin_ws/src/SuperVINS/ThirdParty/Voc/superpoint1.yml.gz" ``` 注意:在配置文件中,路径字符串应该用引号括起来,避免特殊字符问题。 #### 4. 检查文件权限 确保当前用户有读取该文件的权限: ```bash chmod a+r /home/aaa/catkin_ws/src/SuperVINS/supervins_loop_fusion/src/ThirdParty/Voc/superpoint1.yml.gz ``` #### 5. 检查文件完整性 如果文件存在但损坏,重新下载或解压该文件。如果是压缩文件,可以尝试解压: ```bash gzip -d /home/aaa/catkin_ws/src/SuperVINS/supervins_loop_fusion/src/ThirdParty/Voc/superpoint1.yml.gz ``` 注意:解压后会得到`.yml`文件,需要修改配置文件指向解压后的文件(或重新压缩为gzip格式)。 #### 6. 环境变量问题 如果配置文件中使用了环境变量,确保环境变量已正确设置。例如,如果路径中包含`$HOME`,确保它被正确展开。 ### 预防措施 - 在配置文件中使用绝对路径。 - 在项目文档中明确说明词汇表文件的存放位置。 - 在程序启动时检查文件是否存在,并给出更友好的错误提示。 §§相关问题§§ 1. ROS中如何正确设置配置文件中的路径以避免文件找不到的问题? 2. 在C++ ROS节点中,如何优雅地处理文件不存在等异常情况? 3. 如何通过CMake确保资源文件(如词汇表)在安装过程中被正确复制? 4. 在ROS项目中,管理第三方依赖资源的最佳实践是什么?</think>### 问题分析 这个错误发生在运行 ROS 节点 `supervins_loop_fusion_node` 时,具体是加载视觉词汇文件失败: ```bash terminate called after throwing an instance of 'std::runtime_error' what(): Vocabulary::load Could not open file :/home/aaa/catkin_ws/src/SuperVINS/supervins_loop_fusion/src/ThirdParty/Voc/superpoint1.yml.gz ``` ### 错误原因: 1. **文件路径错误**:节点尝试加载 `/home/aaa/catkin_ws/.../superpoint1.yml.gz` 但该路径不存在 2. **配置文件问题**:`euroc_mono_imu_config.yaml` 中指定的词汇表路径不正确 3. **文件缺失**:词汇表文件 `superpoint1.yml.gz` 未正确安装或下载 4. **权限问题**:当前用户无权访问该文件 ### 解决方案: #### 1. 验证文件是否存在 ```bash # 检查文件路径是否存在 ls -l /home/aaa/catkin_ws/src/SuperVINS/supervins_loop_fusion/src/ThirdParty/Voc/superpoint1.yml.gz # 如果不存在,检查实际安装位置 find ~/catkin_ws -name "superpoint1.yml.gz" ``` #### 2. 修复配置文件路径 打开 `euroc_mono_imu_config.yaml`: ```bash nano ~/catkin_ws/src/SuperVINS/config/euroc/euroc_mono_imu_config.yaml ``` 找到 `vocabulary_file` 配置项,修正为实际路径: ```yaml # 修正前 vocabulary_file: /home/aaa/catkin_ws/.../superpoint1.yml.gz # 修正后(示例) vocabulary_file: /home/your_username/catkin_ws/src/SuperVINS/ThirdParty/Voc/superpoint1.yml.gz ``` #### 3. 重新获取词汇表文件 如果文件缺失: ```bash # 进入词汇表目录 cd ~/catkin_ws/src/SuperVINS/supervins_loop_fusion/src/ThirdParty/Voc/ # 从原始仓库下载(示例链接,需确认实际源) wget https://github.com/author/Vocabulary/raw/main/superpoint1.yml.gz ``` #### 4. 设置文件权限 ```bash sudo chmod +r ~/catkin_ws/src/SuperVINS/supervins_loop_fusion/src/ThirdParty/Voc/superpoint1.yml.gz ``` #### 5. 使用环境变量(推荐) 在配置文件中使用 `$(find pkg_name)` 获取路径: ```yaml vocabulary_file: $(find supervins_loop_fusion)/src/ThirdParty/Voc/superpoint1.yml.gz ``` #### 6. 重新编译安装 ```bash cd ~/catkin_ws catkin clean supervins_loop_fusion catkin build supervins_loop_fusion source devel/setup.bash ``` ### 预防措施: 1. 在 ROS 包中使用相对路径:`$(find package_name)/path/to/file` 2. 在 `CMakeLists.txt` 中添加安装指令: ```cmake install(DIRECTORY src/ThirdParty/Voc/ DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/Voc ) ``` 3. 在启动前添加路径检查: ```c++ if (!boost::filesystem::exists(vocab_path)) { ROS_ERROR("Vocabulary file missing at: %s", vocab_path.c_str()); return -1; } ```
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值