I am trying to use a PID controller to achieve a target FPS and Latency. For the PID controller, I used https://github.com/tekdemo/MiniPID.
This is how I set it up in a while
loop:
while(true){
/* Create the command with all the given values.*/
char Run_Command[150];
sprintf(Run_Command,
"./%s --threads=4 --threads2=2 --target=NEON --n=%d --partition_point=%d --partition_point2=%d --order=%s > output.txt",
graph.c_str(), N_Frames, PartitionPoint1, PartitionPoint2,
Order.c_str());
/* Run the command and parse the results.*/
system(Run_Command);
ParseResults();
/* Both Latency and Throughput Requirements are Met.*/
if ( FPSCondition && LatencyCondition ){
printf("Solution Was Found.\n TargetBigFrequency:%d \t TargetLittleFrequency:%d \t PartitionPoint1:%d \t PartitionPoint2:%d \t Order:%s\n",
BigFrequencyTable[BigFrequencyCounter],LittleFrequencyTable[LittleFrequencyCounter], PartitionPoint1, PartitionPoint2, Order.c_str());
break;
}
printf("Target Perfromance Not Satisfied\n\n");
/* Get the output of the PID. */
double output_FPS=pid.getOutput(Sensor_FPS, Target_FPS);
double output_Latency=pid.getOutput(Sensor_Latency, Target_Latency);
/* Do something with the output of the PID. */
}
I don't understand what the output of the PID controller indicates, and how I can use it to transition towards my target FPS and Latency.