Bosch eBike Systems Develops Electric Bike Controller with Model-Based Design

挑战

在紧密的时间表中开发电动自行车的控制系统

Use Model-Based Design with MATLAB and Simulink to design drive and motor control subsystems, run simulations and tests, and generate prototype and production code

结果

  • 设计更新并准备在五分钟内重新测试
  • 生成的代码以满足安全标准
  • Crucial market deadline met

“基于模型的设计的主要业务益处是开发时间较短,成本降低。对我来说,最大的优势来自知道我们可以使用生成的代码,这使得可以在Simulink中的模型级别调试,而不是代码级别。“金宝app

丹尼尔·鲍克斯(Bosch Ebike Systems)
A Bosch eBike Systems drive unit.

在短短三年内,博世eBike Systems从市场新人带来了电动自行车业务的行业领导者。如今,博世EBIKE Systems驱动装置由50多个欧洲自行车品牌使用。

从一开始,Bosch Ebike Systems工程师用Matlab使用基于模型的设计®和模拟金宝app®to speed the design, implementation, and testing of the control systems for its drive units.

“我们的团队只需九个月才能设计和生产驱动系统的客户样本,并且在系统在Eurobike贸易博览会上引入系统之前的时间才有五个月的时间,”博世互联系统博世互联系统领导工程师丹尼尔·鲍克斯(Bosch Ebike Systems)说。“基于模型的设计是有助于我们在此截止日期内提供嵌入式耐电子驱动系统控制器。”

挑战

自行车制造商每天春天推出新型号,当时大多数自行车。博世和其他供应商在每次发射之前提供新系统的制造商;否则,在系统可以合并之前全年通过。

Bosch engineers had a little more than a year to design, implement, test, and prepare the eBike system for demonstration at the prestigious Eurobike trade show.

Because they were building an entirely new system, the team needed a way to simulate their controller design and then quickly deploy it to an embedded microcontroller or prototyping hardware for testing on an actual bike. They wanted to shorten design iterations in which the engineers deploy a design to hardware, either ride the bike or use a test bench to evaluate its performance, refine the design, and then redeploy it for further testing. At the same time, they needed to ensure rider safety.

博世工程师使用基于模型的设计来开发EBIKE驱动系统,根据公司的功能安全标准完成。

They partitioned the drive system controller into two components: a drive controller and a motor controller.

在Simulink中建模的驱动器控制器使用诸如骑车者的节奏,施加在金宝app曲柄处的扭矩以及自行车的速度,以确定电动机需要多大的扭矩以帮助骑车者。

电机控制器,用Simulink和StateFlow建模金宝app®,以更高的时钟频率操作而不是驱动器控制器。它响应于来自驱动控制器的扭矩命令向电机发送信号。

Bosch engineers developed a plant model for each component in Simulink. The drive controller plant model incorporates the rider’s mass and pedaling behavior, as well as environmental factors such as the slope of the ground. The motor controller plant model captures the characteristics of the drive system’s brushless DC motor.

To verify the control algorithms, the team performed separate closed-loop simulations of the drive and motor controllers in Simulink.

对于实时测试,它们使用Simulink Coder™从驱动控制模型中生成代码,编译它,并将其部署到快速原型硬件。金宝app它们使用嵌入式编码器从电机控制模型生成代码®并将其部署到微控制器。

Using a second rapid prototyping unit, the engineers built a test bench equipped with actuators for pedaling a bicycle and sensors to gather performance metrics. They developed test suites for this setup by modeling scenarios in Simulink and using Simulink Coder to generate code for the test hardware.

在MATLAB中工作,该团队分析了模拟和测试结果,创建了扭矩和速度的图来可视化关键性能特征。

博世工程师使用嵌入式编码器从驱动控制和电机控制模型生成微控制器的生产代码。

结果

  • 设计更新并准备在五分钟内重新测试。“在骑ebike后,让我们的系统如何进行,我们在Simulink中调整了控制算法和参数,然后重新生成了原型硬件的代码,”Baumgärtner说。金宝app“在短短五分钟内,我们准备好使用更新的控制器进行测试。”

  • 生成的代码以满足安全标准。“使用Simulink编码器和嵌入式编码器生成的代码具有金宝app零缺陷,”Baumgärtner说。“它是根据我们的内部流程开发的功能安全标准。”

  • Crucial market deadline met。“我们的驱动系统必须可以进行ed at the Eurobike trade fair to capitalize on a once-a-year market opportunity,” says Baumgärtner. “Model-Based Design was vital in enabling us to meet this goal by accelerating design iterations via code generation.”