MicroPilot

MicroPilot Autopilot Users Group

Hello Everyone!

I try to run the autopilot MP2128HeliG2 in trueHWIL setup. After load a simulation to the xPC Target computer I run the Autopilot and I got a lots of errors from sensors. The message gathered from Terminal is:
[1B][2J[1B][0;0HFATAL ERRORS:
Watchdog CRC Mismatch[1B][K
x accl failed [1B][K
Accl Temperatures Failed[1B][K
GPS config error[1B][K
Compass is enabled but is not installed.[1B][K
[1B][K
WARNINGS:
Autopilot loaded with non-release code.[1B][K
[1B][K
Lockd 11.3V 0.0V
spd= 17
z acc=854
compass hdg=0 0 0 0
I tried to run the calibration trueHwil Control Centre program to calibrate sensors. When I load the callibration_2128.thprj file and tried to load it to run the simulation I got the error of different numbers of parameters between downloaded model to target PC and parameter file. In result I cannot load the model to xPC Target computer to run the calibration. In xPC Target I have this message:

Download started...
Download finished
Mismatch between model and kernel versions


Is the calibration proces necessary for those Horizon fatal errors? If Yes then how I can solve the problem with calibration program problem? 

Thanks for any advices
Regards

Janusz

Views: 1297

Attachments:

Reply to This

Replies to This Discussion

Hi Janusz,

Those errors usually come up when the THWIL starting procedure isn't followed exactly. Try this procedure:

1) Power everything off (autopilot, analog int., SPI board, target PC)

2) Power on target PC.

3) Power on SPI boards for >30 s.

4) Load target in THWIL center. Try both "Load model only" and "Load model and custom parameters"

5) Start simulation in THWIL center.

6) Power analog int. board on.

7) Power autopilot

8) Connect in Horizon

9) Wait for ready

10) Click 'power on' in THWIL center.

11) Click arm, takeoff in Horizon.

Let me know what errors you get after following this procedure.

THWIL systems are calibrated before shipment so you probably don't need to calibrate it again.

Hello Kevin, 

Thank You for Your respond. So because calibration isn't necessary then I runed the Target_HeliUAV_2128.thcfg project. It loaded smoothly and all runs good, up to the step 9. The Horizon give multiple errors and "ready" was on red (details in the Horizon_errors_2.png file). Then I run all procedure again with fake gps mode in autopilot - it should be ok because i work indoors. Then I saw that Horizon was ready, but the fatall errors still were present (details in the Horizon_errors_3.png file) and the arm button cannot work if fatal errors were still reported. 

Regards
Janusz

Attachments:

Hi Janusz,

You shouldn't fake the GPS. The GPS should get a lock even when indoors because it is simulated. The fact your GPS indicator is red means there is an issue that needs to be solved.

GPS and gyro both go through the analog board so start checking all the connections on that chain starting from the green connector on the autopilot. It's not locking so it has a tendency to come loose. Reseat it and test again. If the issue persists, check all the other connections. If the issue persists, run the normal THWIL starting procedure again but before powering on the autopilot, open a terminal program such as tera term. Set the same com port and baud rate you have set in Horizon and start recording a log. Then power on the autopilot and wait 30 s for the POST to complete. Then type rrrr for the raw sensor report. Let that run for a minute. Then type gggg for the gps report and wait 1 minute. Send me this report. 

Where did you obtain the Target_HeliUAV_2128.thcfg project from?

What is the filename of the firmware you have loaded to the sensorless autopilot?

Has this THWIL ever worked properly? 

Hello Kevin

The Target_HeliUAV_2128.thcfg project file we had from micropilot -> support -> download and custom section, we downloaded 2015b_THWIL_2_AllModels_with_GPS_ACK.zip package. Is this package compatybile with our autopilot device (S/N: T2-000373)? The firmware is oryginal and we didn't change it. This trueHWIL setup we bought recently and up to now we cannot run it properly without errors. 
Thanks for Your help. 

Attachments:

And one additional explanation in case of misunderstanding. We bought the whole trueHWIL system at 2015 with old autopilot for planes, but only the autopilot was changed to new one for Helicopters at 2023. And we try to run new autopilot with older trueHWIL system.  

Best regards
Janusz

Hi Janusz,

" Is this package compatybile with our autopilot device (S/N: T2-000373)?"

Yes.

Looking at your Report_Autopilot.txt, raw sensors report, for the X, Y and Z accl, they are all reporting 417690 which isn't right. Check the connection of the green connector on the sensorless autopilot. 

Hello Kevin, 

Small success, after disconnecting and connecting those green connectors it seams that the accelerometer starts working properly. I attached the new log file. But still there are problems with pitch gyro, and AGL range that give us the fatal errors.

Attachments:

Hi Janusz,

Yes, it looks like the accl raw readings are better now. The pitch gyro self test failed. You most likely need to run the calibration and to copy the gain and offset to the project you are using again because the sensors are not deflecting enough when the self test signal is sent.

There is a problem with the GPS still. The GGGG report says GPS disconnected. It seems there is no signal. Check that the com cable is plugged into the correct port on the analog box.

You are also getting an AGL range error. Let's try to solve the above two issues first then tackle this one. 

Hi Kevin,
The calibration process finished without any result. Every one of 100 iterations looked the same:

Setting pitch rate to 0: 0
Setting pitch rate to 90: 0
Setting pitch rate to -90: 0
Reading parameter Pitch_Gain: 1.00
Reading parameter Pitch_Offset: 1.00
calc_pitch_rate_scale: 1.#J calc_gyro_0: 1.#R
Writing Pitch_Gain and Pitch_Offset to xPC
Completed 100 iterations but the values still haven't converged. Pitch Rate Gyro 0: 0 -90: 0 +90: 0
Calibration Complete! :)

I opened the parameters list from the model and the parameter 884 Pitch_Gain is equal 0.415946, parameter 885 Pitch_Offset is equal 4.179527. When I uploaded them from xPC Target those parameters had the same values. So its weerd that during calibration process program reads those parameters as 1.00 every time.
I unpluged all wires and pluged them again, also checked the connections many times, and i don't see any differences with MicroPilot trueHWIL Simulator Connector Diagram. I didn't plug the external GPS antena because those signals we should get from model. I also switched places of RS232 cables to check if one of them could be damaged, but still i have the same errors as previously.
Regards and thanks for Your involvement in our couse.
Janusz

Hi Janusz,

The calibration project initial values are wrong that is why they never converge, when you get to 100 it means no convergence, it should have stopped well before then. It saves those values in the project when it gets to 100 and breaks the project because it writes zeros to the calibration values in the .prm file.

Here's what you should do.
-Power everything off.
-Go to Horizon Insight. Downloads, CUSTOM tab, Configuration File, Customer Specific Downloads, THWIL Calibration Project 2015b. Grezgorz has access. He can add you as user.
-Unzip it anywhere.
-Power on the sensorless autopilot.
-Open Horizon and transmit "\CALIBRATION_2015b\THWIL_Fixed_Wing.vrs" to the autopilot. Back up your current VRS first if you wish.
-Close Horizon.
-Power off the sensorless autopilot.
-Open THWIL center and open calibration_2128.thprj.
-Select the "Configuration" tab.
-Power on the target PC.
-In the Load Options frame, select Load Model and Custom Parameters.
-Click Load Target...
-Click Start Simulation
-Turn on power to the Analog board
-Connect HyperTerminal
-Turn on power to the Sensorless autopilot
-Check to ensure the autopilot starts up
-Wait for the autopilot to complete its initialization.
-Close HyperTerminal.
-Select the Auto Calibration tab in the Control Centre.
-Click Start Calibration
-Select the UAV to connect to your sensorless autopilot
-Choose the sensors you want to calibrate. You can select al of the sensors or individual sensors. Sometimes you may achieve successful calibration faster by calibrating just the accelerometers together and then the gyros together and then the pressure sensors together.
-Wait.......
-If calibration completes successfully all the gains and offsets that were selected to be calibrated should be placed in the text controls. Any sensors not chosen for calibration will have zero values.
If you calibrated all sensors together, successfully, you can now export those gains and offsets by clicking Export File
-If you only calibrated some of the sensors in this calibration, you must manually edit the parameter file, using your new calibration values in the text boxes. If you attempt to export the file from a partial calibration like this, any previous values in the file which are zero in this calibration will be overwritten with zeros.
-Those calibrated gains and offsets can then be loaded into the Simulation Model Parameters
-Open your simulation model prm file
-Select the Model Parameters tab
-Click Import M File...
-Select the calibration M file that you just generated from calibration.
-This will load the calibrated gains and offsets into the Model Parameters grid
-You can then save the simulation prm file.

-If the calibration doesn't complete successfully you need to start over by unzipping "CALIBRATION_2015b (ID 53074).zip"

Let me know how this goes.

I've attached the manual for the THWIL calibration utility. But follow the instructions I've sent you.

Attachments:

Report_Autopilot_3.txt

Hi Kevin, 

Thanks for the calibration files. We downloaded it and tried this approach. But the calibration process still didn't converge in any sensor. After first iteration the gains go to 1 and didn't change till the 100 iteration. The good news is that when I uploaded those files the Fatal Errors in autopilot were from AGL and GPS: 
AGL range err [1B][K
GPS config error[1B][K
So with this the pich Gyro and X accl works OK. 
We also cannot find at Horizon Insight the second archive: "CALIBRATION_2015b (ID 53074).zip". Is it in a diferent path? 

Best regards

Janusz

Hi Janusz,

"But the calibration process still didn't converge in any sensor. After first iteration the gains go to 1 and didn't change till the 100 iteration. "

Repeat the process from the start but this time do just airspeed and altitude. Let me know the results of that. Send the output if you can. 

"We also cannot find at Horizon Insight the second archive: "CALIBRATION_2015b (ID 53074).zip". Is it in a diferent path? "

Sorry, that was a typo. I meant to say "-If the calibration doesn't complete successfully you need to start over by unzipping "CALIBRATION_2015b.zip"" There is only the one archive. 

RSS

Share

© 2024   Created by MicroPilotNingAdmin.   Powered by

Report an Issue  |  Terms of Service