Update GSoC Students Blogs authored by Andrea Zanoni's avatar Andrea Zanoni
# Google Summer of Code 2020 students blogs
# Google Summer of Code Students Blogs
## 2020 GSoC Students Blogs
[Runsen Zhang](@buaa_zhangrunsen) and [Boyan Zhou](@steven.b.zhou), our 2020 GSoC
students, will post here their weekly development blogs.
* Runsen Zhang: [MBDyn -- Chrono::Engine interface](#a-user-defined-runtime-loadable-module-template-for-co-simulation-with)
* Boyan Zhou: [Embedded Optimization](#embedded-optimization)
## A user-defined runtime loadable module template for co-simulation with
### A user-defined runtime loadable module template for co-simulation with
[Chrono::Engine](http://projectchrono.org/)
* **Author**: [Runsen Zhang](@buaa_zhangrunsen)
* **Mentors**: [Pierangelo Masarati](@10102934), [Andrea Zanoni](@10260632)
......@@ -25,7 +26,7 @@ interface in the opaque object, and link it to the MBDyn’s module.
* C::E code for example (e.f. a mass, or a mass and a spring, ...)
* Desired: interface for arbitrary number of nodes
### First Week: June 1st-7th
#### First Week: June 1st-7th
In the first week, my mentors and I settled on the plan.
The scope of the first part of my plan is to built the MBDyn user-defined element, that
......@@ -37,7 +38,7 @@ corresponded each step to the simulation process in MBDyn. And according to this
starting writing the MBDyn-side codes. When this part works, I will test it using a
simple C::E model, and show them to the mentors.
### Second Week: June 8th-14th
#### Second Week: June 8th-14th
The following Files are created:
* ce_models.cc.
......@@ -48,10 +49,10 @@ The following Files are created:
In this week, the library "libCE_models.so" including an easy C::E model is generated, and connected to the MBDyn module::module-chrono-interface. And now, the C::E model and the MBDyn model could be loaded and solved in the meantime. In next week, attention will be paid to the data exchange between two solvers.
### Third Week: June 15th-21st
#### Third Week: June 15th-21st
In this week, I am working on the functions used in the co-simulation. Some functions are defined and added to the module. Through these functions, all coupling variables are saved in two std::vector containers in each iteration, and two solvers could send and receive data through these functions. More details will be defined in the following week.
### Fourth Week: June 22nd-28th
#### Fourth Week: June 22nd-28th
In this week, I am working on the functions used in the co-simulation, and defined the following functions to construct the problem:
* AssRes();
......@@ -61,22 +62,22 @@ In this week, I am working on the functions used in the co-simulation, and defin
And a demo that does not exchange coupling variables is run to test the code.
In next week, I will pay attention to imposing the motion to the selected bodies in C::E model.
### Fifth Week: June 29th-July 5th
#### Fifth Week: June 29th-July 5th
In this week, the codes for one coupling node is almost finished. I complied the codes, but didn't test them. Besides, the current codes need to be more general for a general coupling node, and that's what I will focus on next week.
### Sixth Week: July 6th-July 12nd
#### Sixth Week: July 6th-July 12nd
In this week, the codes for one coupling node is tested by the two-dimension two-mass example. It seems that everything is OK. In next week, I will check the codes with different three-dimension examples. Besides, I will also think about how to impose coupling velocities to C::E bodies.
### Seventh Week: July 13rd-July 19th
#### Seventh Week: July 13rd-July 19th
In this week, two examples, three-dimensional two-mass oscillator system and a three-dimensional pendulum system, are tested using the module-chrono-interface. It follows that results obtained are consistent with those obtained from the co-simulaiton using sockets, and the monolithic methods. As for the velocities problem, I didn't find a suitable interface in Chrono, so I think I would try to use some interpolation methods in Chrono to generate high-order position lines that include the information about velocities.
### Eighth Week: July 20th-July 26th
#### Eighth Week: July 20th-July 26th
To impose velocities to bodies in C::E, I may need more time to know the interpolation methods about quaternion. In the meantime, I added a check process to ensure that two codes have the consistent initial conditions, and improved codes for arbitrary number of nodes. The codes are complied successfully. In next week, I will test a multi-node case.
### Ninth and tenth Weeks: July 27th-August 9th
#### Ninth and tenth Weeks: July 27th-August 9th
To impose velocities to bodies in C::E, I try to use the SetPoint() function in Chrono, which gives the C::E motor information about the position, velocity, and acceleration. The codes are compiled, and tested. It follows that the results agree with those obtained from the linear interpolation method used before. However, some oscillations are observed on the velocity and acceleration levels. I need to know why these oscillations happen and how to avoid them.
## Embedded Optimization
### Embedded Optimization
* **Author**: [Boyan Zhou](@steven.b.zhou)
* **Mentors**: [Andrea Zanoni](@10260632), [Pierangelo Masarati](@10102934)
* **Branch**: [`gsoc_optimization`](https://public.gitlab.polimi.it/DAER/mbdyn/-/tree/gsoc_optimization)
......@@ -97,7 +98,7 @@ The goal is for the developed code to enable the problems
to be minimized;
* Desired: allow for arbitrary contraints to be added.
### First Week: June 1st-7th
#### First Week: June 1st-7th
My first week was mainly spent on studying the problem:
* read through inverse dynamic problem in techman, figure out different problem types;
......@@ -106,7 +107,7 @@ My first week was mainly spent on studying the problem:
I am now working on the code and I think I will able to do more next week.
### Second Week: June 8th-14th
#### Second Week: June 8th-14th
After modified the following files:
* mbdyn/base/invsolver.cc
......@@ -115,7 +116,7 @@ After modified the following files:
overactuated problems can now be recognized by the parser and the inverse dynamics solver.
Changes with regard to the related files has been committed to gsoc_optimization branch
### Third Week: June 15th-21st
#### Third Week: June 15th-21st
Modified following functions to construct the problem:
......@@ -125,7 +126,7 @@ Modified following functions to construct the problem:
The next step is to build up the solution.
### Forth Week: June 22nd-28th
#### Forth Week: June 22nd-28th
Test the input file 'planar_3link_ergo2_oa.mbd', and Made several discoveries:
......@@ -135,7 +136,7 @@ Test the input file 'planar_3link_ergo2_oa.mbd', and Made several discoveries:
Maybe the next step is to convert the problem to a simpler, single-step solution of the underlining linear problem.
### Fifth Week: June 29th-July 5th
#### Fifth Week: June 29th-July 5th
We find out that problem at the inverse dynamics step is formulated the
right way, so we just need to understand why it is not given the expected
......@@ -143,7 +144,7 @@ results.
Also, I start to build up a check for the inverse dynamics problem, checking for input size, solver type, etc.
### Sixth Week: July 6th-12nd
#### Sixth Week: July 6th-12nd
* Check the input and output, found many functions regarding inverse dynamic problems are NO_OP.
* Check the UTSolve(), found something strange (not sure if it is a bug).
......
......