Motion Master 6.0.0-alpha.111
Next-generation motion control software
Loading...
Searching...
No Matches
plant_identification.cc File Reference
#include "node/plant_identification.h"
#include <algorithm>
#include <cmath>
#include <cstddef>
#include <format>
#include <functional>
#include <numbers>
#include <numeric>
#include <string>
#include <string_view>
#include <utility>
#include <vector>
Include dependency graph for plant_identification.cc:

Namespaces

namespace  mm
 
namespace  mm::node
 

Functions

void mm::node::to_json (nlohmann::json &j, const PlantModelChirp &chirp)
 
void mm::node::to_json (nlohmann::json &j, const PlantModel &model)
 
std::expected< std::chrono::milliseconds, std::string > mm::node::plantIdentificationStreamDuration (std::chrono::milliseconds transitionTime)
 How long the HRD stream must run for a chirp of transitionTime.
 
PlantMeasurement mm::node::convertPlantMeasurement (std::span< const HrdSystemIdentificationSample > samples, uint32_t ratedTorqueMilliNm)
 Converts a recording into the units the fit takes.
 
std::expected< std::optional< std::string >, std::string > mm::node::checkPlantMeasurementAmplitudes (const PlantMeasurement &measurement, uint32_t ratedTorqueMilliNm)
 Checks that the recording excited the plant enough for a fit.
 
bool mm::node::isStablePlantModel (std::span< const double > denominator)
 Whether a model with this denominator is stable.
 
std::string mm::node::plantModelCsv (const PlantModel &model)
 Renders a model as the text of kPlantModelFile.
 
std::expected< PlantModel, std::string > mm::node::parsePlantModelCsv (std::string_view text)
 Reads the text of kPlantModelFile.